Documentation
¶
Index ¶
Constants ¶
View Source
const SyncBound = 10 * time.Second
Variables ¶
View Source
var ( ErrUnexpectedMerkleRoot = errors.New("unexpected merkle root") ErrTimestampBeyondSyncBound = errors.New("proposed timestamp is too far in the future relative to local time") ErrEmptyBlock = errors.New("block contains no transactions") ErrChildBlockEarlierThanParent = errors.New("proposed timestamp before current chain time") ErrConflictingBlockTxs = errors.New("block contains conflicting transactions") ErrIncorrectHeight = errors.New("block has incorrect height") ErrBlockNotFound = errors.New("block not found") )
View Source
var ( ErrChainNotSynced = errors.New("chain not synced") ErrConflictingParentTxs = errors.New("block contains a transaction that conflicts with a transaction in a parent block") )
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface {
state.Versions
// Returns the ID of the most recently accepted block.
LastAccepted() ids.ID
SetPreference(blkID ids.ID)
Preferred() ids.ID
GetBlock(blkID ids.ID) (chain.Block, error)
GetStatelessBlock(blkID ids.ID) (block.Block, error)
NewBlock(block.Block) chain.Block
// VerifyTx verifies that the transaction can be issued based on the currently
// preferred state. This should *not* be used to verify transactions in a block.
VerifyTx(tx *txs.Tx) error
// VerifyUniqueInputs returns nil iff no blocks in the inclusive
// ancestry of [blkID] consume an input in [inputs].
VerifyUniqueInputs(blkID ids.ID, inputs set.Set[ids.ID]) error
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package executormock is a generated GoMock package.
|
Package executormock is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.