transactionpool

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: MIT Imports: 24 Imported by: 0

Documentation

Index

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 NewCommittedPool(transactionPoolFutureTimestampGraceTimeout func() time.Duration, metricFactory metric.Factory) *committedTxPool

func NewPendingPool

func NewPendingPool(pendingPoolSizeInBytes func() uint32, metricFactory metric.Factory, onNewTransaction func()) *pendingTxPool

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 (*Service) CommitTransactionReceipts added in v1.2.1

func (*Service) GetCommittedTransactionReceipt added in v1.2.1

func (*Service) GetTransactionsForOrdering added in v1.2.1

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

type TransactionForwarderConfig

type TransactionForwarderConfig interface {
	NodeAddress() primitives.NodeAddress
	TransactionPoolPropagationBatchSize() uint16
	TransactionPoolPropagationBatchingTimeout() time.Duration
}

type Transactions

type Transactions []*protocol.SignedTransaction

type TxId

type TxId []byte

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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