Add `Proposal.transactionCount`

This commit is contained in:
Jack Grigg 2024-03-07 19:49:18 +00:00
parent c4b45c2c2f
commit c8d0be8404
2 changed files with 24 additions and 0 deletions

View File

@ -37,6 +37,18 @@ class ProposalUnsafe(
return inner.toByteArray()
}
/**
* Returns the number of transactions that this proposal will create.
*
* This is equal to the number of `TransactionSubmitResult`s that will be returned
* from `Synchronizer.createProposedTransactions`.
*
* Proposals always create at least one transaction.
*/
fun transactionCount(): Int {
return inner.stepsCount
}
/**
* Returns the total fee required by this proposal for its transactions.
*/

View File

@ -33,6 +33,18 @@ class Proposal(
return inner
}
/**
* Returns the number of transactions that this proposal will create.
*
* This is equal to the number of `TransactionSubmitResult`s that will be returned
* from `Synchronizer.createProposedTransactions`.
*
* Proposals always create at least one transaction.
*/
fun transactionCount(): Int {
return inner.transactionCount()
}
/**
* Returns the total fee required by this proposal for its transactions.
*/