Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEndOfTime = errors.New("program time is suspiciously far in the future") ErrNoPendingBlocks = errors.New("no pending blocks") )
Functions ¶
Types ¶
type Builder ¶
type Builder interface {
smblock.BuildBlockWithContextChainVM
// Add adds `tx` to the mempool and clears its dropped status.
Add(tx *txs.Tx) error
// Get returns the tx corresponding to `txID` and if it was present
Get(txID ids.ID) (*txs.Tx, bool)
// GetDropReason returns why `txID` was dropped
GetDropReason(txID ids.ID) error
// WaitForEvent blocks until the mempool has txs that are ready to build into
// a block.
WaitForEvent(ctx context.Context) (common.Message, error)
// BuildBlock can be called to attempt to create a new block
BuildBlock(context.Context) (snowman.Block, error)
// PackAllBlockTxs returns an array of all txs that could be packed into a
// valid block of infinite size. The returned txs are all verified against
// the preferred state.
//
// Note: This function does not call the consensus engine.
PackAllBlockTxs() ([]*txs.Tx, error)
}
func New ¶
func New( mempool *mempool.Mempool, txExecutorBackend *txexecutor.Backend, blkManager blockexecutor.Manager, ) Builder
Click to show internal directories.
Click to hide internal directories.