txmass

package
v0.12.18-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2024 License: ISC Imports: 3 Imported by: 3

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL