Documentation ¶
Index ¶
- Constants
- Variables
- func HashTransactions(txs ...*protocol.SignedTransaction) (oneBigHash []byte, hashes []primitives.Sha256, err error)
- func NewCommittedPool(metricFactory metric.Factory) *committedTxPool
- func NewPendingPool(pendingPoolSizeInBytes func() uint32, metricFactory metric.Factory) *pendingTxPool
- func NewTransactionForwarder(ctx context.Context, logger log.BasicLogger, config TransactionForwarderConfig, ...) *transactionForwarder
- func NewTransactionPool(ctx context.Context, gossip gossiptopics.TransactionRelay, ...) services.TransactionPool
- type BlockHeightReporter
- type ErrTransactionRejected
- type TransactionForwarderConfig
- type Transactions
- type TxId
Constants ¶
View Source
const ProtocolVersion = primitives.ProtocolVersion(1)
Variables ¶
View Source
var LogTag = log.Service("transaction-pool")
Functions ¶
func HashTransactions ¶
func HashTransactions(txs ...*protocol.SignedTransaction) (oneBigHash []byte, hashes []primitives.Sha256, err error)
func NewCommittedPool ¶
func NewPendingPool ¶
func NewTransactionForwarder ¶
func NewTransactionForwarder(ctx context.Context, logger log.BasicLogger, config TransactionForwarderConfig, gossip gossiptopics.TransactionRelay) *transactionForwarder
func NewTransactionPool ¶
func NewTransactionPool(ctx context.Context, gossip gossiptopics.TransactionRelay, virtualMachine services.VirtualMachine, blockHeightReporter BlockHeightReporter, config config.TransactionPoolConfig, parent log.BasicLogger, metricFactory metric.Factory) services.TransactionPool
Types ¶
type BlockHeightReporter ¶ added in v0.7.1
type BlockHeightReporter interface {
IncrementHeight()
}
type ErrTransactionRejected ¶
type ErrTransactionRejected struct { TransactionStatus protocol.TransactionStatus Expected *log.Field Actual *log.Field }
func (*ErrTransactionRejected) Error ¶
func (e *ErrTransactionRejected) Error() string
type TransactionForwarderConfig ¶
type TransactionForwarderConfig interface { NodeAddress() primitives.NodeAddress NodePrivateKey() primitives.EcdsaSecp256K1PrivateKey TransactionPoolPropagationBatchSize() uint16 TransactionPoolPropagationBatchingTimeout() time.Duration }
type Transactions ¶
type Transactions []*protocol.SignedTransaction
Source Files ¶
Click to show internal directories.
Click to hide internal directories.