Versions in this module Expand all Collapse all v1 v1.1.1 Dec 18, 2024 Changes in this version + const SyncBound + var ErrBlockNotFound = errors.New("block not found") + var ErrChainNotSynced = errors.New("chain not synced") + var ErrChildBlockEarlierThanParent = errors.New("proposed timestamp before current chain time") + var ErrConflictingBlockTxs = errors.New("block contains conflicting transactions") + var ErrConflictingParentTxs = errors.New(...) + var ErrEmptyBlock = errors.New("block contains no transactions") + var ErrIncorrectHeight = errors.New("block has incorrect height") + var ErrTimestampBeyondSyncBound = errors.New("proposed timestamp is too far in the future relative to local time") + var ErrUnexpectedMerkleRoot = errors.New("unexpected merkle root") + type Block struct + func (b *Block) Accept(context.Context) error + func (b *Block) Reject(context.Context) error + func (b *Block) Status() choices.Status + func (b *Block) Verify(context.Context) error + type Manager interface + GetBlock func(blkID ids.ID) (snowman.Block, error) + GetStatelessBlock func(blkID ids.ID) (blocks.Block, error) + LastAccepted func() ids.ID + NewBlock func(blocks.Block) snowman.Block + Preferred func() ids.ID + SetPreference func(blkID ids.ID) + VerifyTx func(tx *txs.Tx) error + VerifyUniqueInputs func(blkID ids.ID, inputs set.Set[ids.ID]) error + func NewManager(mempool mempool.Mempool, metrics metrics.Metrics, state states.State, ...) Manager + type MockManager struct + func NewMockManager(ctrl *gomock.Controller) *MockManager + func (m *MockManager) EXPECT() *MockManagerMockRecorder + func (m *MockManager) GetBlock(arg0 ids.ID) (snowman.Block, error) + func (m *MockManager) GetState(arg0 ids.ID) (states.Chain, bool) + func (m *MockManager) GetStatelessBlock(arg0 ids.ID) (blocks.Block, error) + func (m *MockManager) LastAccepted() ids.ID + func (m *MockManager) NewBlock(arg0 blocks.Block) snowman.Block + func (m *MockManager) Preferred() ids.ID + func (m *MockManager) SetPreference(arg0 ids.ID) + func (m *MockManager) VerifyTx(arg0 *txs.Tx) error + func (m *MockManager) VerifyUniqueInputs(arg0 ids.ID, arg1 set.Set[ids.ID]) error + type MockManagerMockRecorder struct + func (mr *MockManagerMockRecorder) GetBlock(arg0 interface{}) *gomock.Call + func (mr *MockManagerMockRecorder) GetState(arg0 interface{}) *gomock.Call + func (mr *MockManagerMockRecorder) GetStatelessBlock(arg0 interface{}) *gomock.Call + func (mr *MockManagerMockRecorder) LastAccepted() *gomock.Call + func (mr *MockManagerMockRecorder) NewBlock(arg0 interface{}) *gomock.Call + func (mr *MockManagerMockRecorder) Preferred() *gomock.Call + func (mr *MockManagerMockRecorder) SetPreference(arg0 interface{}) *gomock.Call + func (mr *MockManagerMockRecorder) VerifyTx(arg0 interface{}) *gomock.Call + func (mr *MockManagerMockRecorder) VerifyUniqueInputs(arg0, arg1 interface{}) *gomock.Call