Documentation ¶
Index ¶
- func TransactionOutputEstimatedSerializedSize(output *externalapi.DomainTransactionOutput) uint64
- type Calculator
- func (c *Calculator) CalculateTransactionMass(transaction *externalapi.DomainTransaction) uint64
- func (c *Calculator) CalculateTransactionOverallMass(transaction *externalapi.DomainTransaction) uint64
- func (c *Calculator) CalculateTransactionStorageMass(transaction *externalapi.DomainTransaction) uint64
- func (c *Calculator) MassPerScriptPubKeyByte() uint64
- func (c *Calculator) MassPerSigOp() uint64
- func (c *Calculator) MassPerTxByte() uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TransactionOutputEstimatedSerializedSize ¶
func TransactionOutputEstimatedSerializedSize(output *externalapi.DomainTransactionOutput) uint64
TransactionOutputEstimatedSerializedSize is the same as transactionEstimatedSerializedSize but for outputs only
Types ¶
type Calculator ¶
type Calculator struct {
// contains filtered or unexported fields
}
Calculator exposes methods to calculate the mass of a transaction
func NewCalculator ¶
func NewCalculator(massPerTxByte, massPerScriptPubKeyByte, massPerSigOp uint64) *Calculator
NewCalculator creates a new instance of Calculator
func (*Calculator) CalculateTransactionMass ¶
func (c *Calculator) CalculateTransactionMass(transaction *externalapi.DomainTransaction) uint64
CalculateTransactionMass calculates the mass of the given transaction
func (*Calculator) CalculateTransactionOverallMass ¶ added in v0.12.19
func (c *Calculator) CalculateTransactionOverallMass(transaction *externalapi.DomainTransaction) uint64
CalculateTransactionOverallMass calculates the overall mass of the transaction including compute and storage mass components (see KIP-0009)
func (*Calculator) CalculateTransactionStorageMass ¶ added in v0.12.19
func (c *Calculator) CalculateTransactionStorageMass(transaction *externalapi.DomainTransaction) uint64
CalculateTransactionStorageMass calculates the storage mass of the given transaction (see KIP-0009)
func (*Calculator) MassPerScriptPubKeyByte ¶
func (c *Calculator) MassPerScriptPubKeyByte() uint64
MassPerScriptPubKeyByte returns the mass per ScriptPublicKey byte configured for this Calculator
func (*Calculator) MassPerSigOp ¶
func (c *Calculator) MassPerSigOp() uint64
MassPerSigOp returns the mass per SigOp byte configured for this Calculator
func (*Calculator) MassPerTxByte ¶
func (c *Calculator) MassPerTxByte() uint64
MassPerTxByte returns the mass per transaction byte configured for this Calculator