Documentation
¶
Index ¶
- Variables
- func VerifyWarpMessages(ctx context.Context, networkID uint32, validatorState validators.State, ...) error
- type Block
- func (b *Block) Accept(context.Context) error
- func (b *Block) Options(context.Context) ([2]snowman.Block, error)
- func (b *Block) Reject(context.Context) error
- func (*Block) ShouldVerifyWithContext(context.Context) (bool, error)
- func (b *Block) Timestamp() time.Time
- func (b *Block) Verify(ctx context.Context) error
- func (b *Block) VerifyWithContext(ctx context.Context, blockContext *smblock.Context) error
- type Manager
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrChainNotSynced = errors.New("chain not synced") ErrImportTxWhilePartialSyncing = errors.New("issuing an import tx is not allowed while partial syncing") )
View Source
var ( ErrConflictingBlockTxs = errors.New("block contains conflicting transactions") ErrStandardBlockWithoutChanges = errors.New("BanffStandardBlock performs no state changes") )
Functions ¶
func VerifyWarpMessages ¶ added in v1.11.13
func VerifyWarpMessages( ctx context.Context, networkID uint32, validatorState validators.State, pChainHeight uint64, b block.Block, ) error
VerifyWarpMessages verifies all warp messages in the block. If any of the warp messages are invalid, an error is returned.
Types ¶
type Block ¶
Exported for testing in platformvm package.
func (*Block) ShouldVerifyWithContext ¶ added in v1.11.11
type Manager ¶
type Manager interface {
state.Versions
// Returns the ID of the most recently accepted block.
LastAccepted() ids.ID
SetPreference(blkID ids.ID, blockCtx *snowmanblock.Context)
Preferred() ids.ID
GetBlock(blkID ids.ID) (snowman.Block, error)
GetStatelessBlock(blkID ids.ID) (block.Block, error)
NewBlock(block.Block) snowman.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 verifies that the inputs are not duplicated in the
// provided blk or any of its ancestors pinned in memory.
VerifyUniqueInputs(blkID ids.ID, inputs set.Set[ids.ID]) error
}
Source Files
¶
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.