Documentation ¶
Index ¶
- Constants
- Variables
- func HashTransactions(txs ...*protocol.SignedTransaction) (oneBigHash []byte, hashes []primitives.Sha256, err error)
- func NewCommittedPool(transactionPoolFutureTimestampGraceTimeout func() time.Duration, ...) *committedTxPool
- func NewPendingPool(pendingPoolSizeInBytes func() uint32, metricFactory metric.Factory, ...) *pendingTxPool
- func NewRequestConcurrencyLimiter(maxConcurrentRequests int) *requestConcurrencyLimiter
- func NewTransactionForwarder(ctx context.Context, logger log.Logger, signer signer.Signer, ...) *transactionForwarder
- type BlockHeightReporter
- type ErrTransactionRejected
- type Service
- func (s *Service) AddNewTransaction(ctx context.Context, input *services.AddNewTransactionInput) (*services.AddNewTransactionOutput, error)
- func (s *Service) CommitTransactionReceipts(ctx context.Context, input *services.CommitTransactionReceiptsInput) (*services.CommitTransactionReceiptsOutput, error)
- func (s *Service) GetCommittedTransactionReceipt(ctx context.Context, input *services.GetCommittedTransactionReceiptInput) (*services.GetCommittedTransactionReceiptOutput, error)
- func (s *Service) GetTransactionsForOrdering(ctx context.Context, input *services.GetTransactionsForOrderingInput) (*services.GetTransactionsForOrderingOutput, error)
- func (s *Service) HandleForwardedTransactions(ctx context.Context, input *gossiptopics.ForwardedTransactionsInput) (*gossiptopics.EmptyOutput, error)
- func (s *Service) RegisterTransactionResultsHandler(handler handlers.TransactionResultsHandler)
- func (s *Service) ValidateTransactionsForOrdering(ctx context.Context, input *services.ValidateTransactionsForOrderingInput) (*services.ValidateTransactionsForOrderingOutput, error)
- 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 NewRequestConcurrencyLimiter ¶ added in v0.7.11
func NewRequestConcurrencyLimiter(maxConcurrentRequests int) *requestConcurrencyLimiter
func NewTransactionForwarder ¶
func NewTransactionForwarder(ctx context.Context, logger log.Logger, signer signer.Signer, config TransactionForwarderConfig, gossip gossiptopics.TransactionRelay) *transactionForwarder
Types ¶
type BlockHeightReporter ¶ added in v0.7.1
type BlockHeightReporter interface {
IncrementTo(height primitives.BlockHeight)
}
type ErrTransactionRejected ¶
type ErrTransactionRejected struct { TransactionStatus protocol.TransactionStatus Expected *log.Field Actual *log.Field }
func (*ErrTransactionRejected) Error ¶
func (e *ErrTransactionRejected) Error() string
type Service ¶ added in v1.2.1
type Service struct { govnr.TreeSupervisor // contains filtered or unexported fields }
func NewTransactionPool ¶
func NewTransactionPool(ctx context.Context, maybeClock adapter.Clock, gossip gossiptopics.TransactionRelay, virtualMachine services.VirtualMachine, signer signer.Signer, blockHeightReporter BlockHeightReporter, config config.TransactionPoolConfig, parent log.Logger, metricFactory metric.Factory) *Service
func (*Service) AddNewTransaction ¶ added in v1.2.1
func (s *Service) AddNewTransaction(ctx context.Context, input *services.AddNewTransactionInput) (*services.AddNewTransactionOutput, error)
func (*Service) CommitTransactionReceipts ¶ added in v1.2.1
func (s *Service) CommitTransactionReceipts(ctx context.Context, input *services.CommitTransactionReceiptsInput) (*services.CommitTransactionReceiptsOutput, error)
func (*Service) GetCommittedTransactionReceipt ¶ added in v1.2.1
func (s *Service) GetCommittedTransactionReceipt(ctx context.Context, input *services.GetCommittedTransactionReceiptInput) (*services.GetCommittedTransactionReceiptOutput, error)
func (*Service) GetTransactionsForOrdering ¶ added in v1.2.1
func (s *Service) GetTransactionsForOrdering(ctx context.Context, input *services.GetTransactionsForOrderingInput) (*services.GetTransactionsForOrderingOutput, error)
func (*Service) HandleForwardedTransactions ¶ added in v1.2.1
func (s *Service) HandleForwardedTransactions(ctx context.Context, input *gossiptopics.ForwardedTransactionsInput) (*gossiptopics.EmptyOutput, error)
func (*Service) RegisterTransactionResultsHandler ¶ added in v1.2.1
func (s *Service) RegisterTransactionResultsHandler(handler handlers.TransactionResultsHandler)
func (*Service) ValidateTransactionsForOrdering ¶ added in v1.2.1
func (s *Service) ValidateTransactionsForOrdering(ctx context.Context, input *services.ValidateTransactionsForOrderingInput) (*services.ValidateTransactionsForOrderingOutput, error)
type TransactionForwarderConfig ¶
type TransactionForwarderConfig interface { NodeAddress() primitives.NodeAddress TransactionPoolPropagationBatchSize() uint16 TransactionPoolPropagationBatchingTimeout() time.Duration }
type Transactions ¶
type Transactions []*protocol.SignedTransaction
Source Files ¶
- add_new_transaction.go
- cleanup.go
- commit_transaction_receipts.go
- committed_pool.go
- errors.go
- forward_transactions.go
- get_committed_transaction_result.go
- get_transactions_for_ordering.go
- init.go
- pending_pool.go
- request_concurrency_limiter.go
- service.go
- transaction_waiter.go
- types.go
- validate_transaction.go
- validate_transactions_for_ordering.go
Click to show internal directories.
Click to hide internal directories.