Versions in this module Expand all Collapse all v1 v1.11.11 Aug 6, 2024 Changes in this version + var ErrChainNotSynced = errors.New("chain not synced") + var ErrConflictingBlockTxs = errors.New("block contains conflicting transactions") + type Block struct + func (*Block) ShouldVerifyWithContext(context.Context) (bool, error) + 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 (b *Block) Timestamp() time.Time + func (b *Block) Verify(ctx context.Context) error + func (b *Block) VerifyWithContext(_ context.Context, ctx *smblock.Context) error + type Manager interface + GetBlock func(blkID ids.ID) (snowman.Block, error) + GetStatelessBlock func(blkID ids.ID) (block.Block, error) + LastAccepted func() ids.ID + NewBlock func(block.Block) snowman.Block + Preferred func() ids.ID + SetPreference func(blkID ids.ID) (updated bool) + 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, s state.State, ...) Manager + type MockManager struct + func NewMockManager(ctrl *gomock.Controller) *MockManager + func (m *MockManager) EXPECT() *MockManagerMockRecorder + func (m *MockManager) GetBlock(blkID ids.ID) (snowman.Block, error) + func (m *MockManager) GetState(blkID ids.ID) (state.Chain, bool) + func (m *MockManager) GetStatelessBlock(blkID ids.ID) (block.Block, error) + func (m *MockManager) LastAccepted() ids.ID + func (m *MockManager) NewBlock(arg0 block.Block) snowman.Block + func (m *MockManager) Preferred() ids.ID + func (m *MockManager) SetPreference(blkID ids.ID) bool + func (m *MockManager) VerifyTx(tx *txs.Tx) error + func (m *MockManager) VerifyUniqueInputs(blkID ids.ID, inputs set.Set[ids.ID]) error + type MockManagerMockRecorder struct + func (mr *MockManagerMockRecorder) GetBlock(blkID any) *gomock.Call + func (mr *MockManagerMockRecorder) GetState(blkID any) *gomock.Call + func (mr *MockManagerMockRecorder) GetStatelessBlock(blkID any) *gomock.Call + func (mr *MockManagerMockRecorder) LastAccepted() *gomock.Call + func (mr *MockManagerMockRecorder) NewBlock(arg0 any) *gomock.Call + func (mr *MockManagerMockRecorder) Preferred() *gomock.Call + func (mr *MockManagerMockRecorder) SetPreference(blkID any) *gomock.Call + func (mr *MockManagerMockRecorder) VerifyTx(tx any) *gomock.Call + func (mr *MockManagerMockRecorder) VerifyUniqueInputs(blkID, inputs any) *gomock.Call