Versions in this module Expand all Collapse all v1 v1.11.13-rc.2 Dec 4, 2024 v1.0.0 Dec 4, 2024 Changes in this version + const CodecVersion + var Codec codec.Manager + type BlockState interface + DeleteBlock func(blkID ids.ID) error + GetBlock func(blkID ids.ID) (block.Block, choices.Status, error) + PutBlock func(blk block.Block, status choices.Status) error + func NewBlockState(db database.Database) BlockState + func NewMeteredBlockState(db database.Database, namespace string, metrics prometheus.Registerer) (BlockState, error) + type ChainState interface + DeleteLastAccepted func() error + GetLastAccepted func() (ids.ID, error) + SetLastAccepted func(blkID ids.ID) error + func NewChainState(db database.Database) ChainState + type HeightIndex interface + func NewHeightIndex(db database.Database, commitable versiondb.Commitable) HeightIndex + type HeightIndexGetter interface + GetBlockIDAtHeight func(height uint64) (ids.ID, error) + GetForkHeight func() (uint64, error) + GetMinimumHeight func() (uint64, error) + type HeightIndexWriter interface + DeleteBlockIDAtHeight func(height uint64) error + SetBlockIDAtHeight func(height uint64, blkID ids.ID) error + SetForkHeight func(height uint64) error + type MockState struct + func NewMockState(ctrl *gomock.Controller) *MockState + func (m *MockState) DeleteBlock(arg0 ids.ID) error + func (m *MockState) DeleteBlockIDAtHeight(arg0 uint64) error + func (m *MockState) DeleteLastAccepted() error + func (m *MockState) EXPECT() *MockStateMockRecorder + func (m *MockState) GetBlock(arg0 ids.ID) (block.Block, choices.Status, error) + func (m *MockState) GetBlockIDAtHeight(arg0 uint64) (ids.ID, error) + func (m *MockState) GetForkHeight() (uint64, error) + func (m *MockState) GetLastAccepted() (ids.ID, error) + func (m *MockState) GetMinimumHeight() (uint64, error) + func (m *MockState) PutBlock(arg0 block.Block, arg1 choices.Status) error + func (m *MockState) SetBlockIDAtHeight(arg0 uint64, arg1 ids.ID) error + func (m *MockState) SetForkHeight(arg0 uint64) error + func (m *MockState) SetLastAccepted(arg0 ids.ID) error + type MockStateMockRecorder struct + func (mr *MockStateMockRecorder) DeleteBlock(arg0 any) *gomock.Call + func (mr *MockStateMockRecorder) DeleteBlockIDAtHeight(arg0 any) *gomock.Call + func (mr *MockStateMockRecorder) DeleteLastAccepted() *gomock.Call + func (mr *MockStateMockRecorder) GetBlock(arg0 any) *gomock.Call + func (mr *MockStateMockRecorder) GetBlockIDAtHeight(arg0 any) *gomock.Call + func (mr *MockStateMockRecorder) GetForkHeight() *gomock.Call + func (mr *MockStateMockRecorder) GetLastAccepted() *gomock.Call + func (mr *MockStateMockRecorder) GetMinimumHeight() *gomock.Call + func (mr *MockStateMockRecorder) PutBlock(arg0, arg1 any) *gomock.Call + func (mr *MockStateMockRecorder) SetBlockIDAtHeight(arg0, arg1 any) *gomock.Call + func (mr *MockStateMockRecorder) SetForkHeight(arg0 any) *gomock.Call + func (mr *MockStateMockRecorder) SetLastAccepted(arg0 any) *gomock.Call + type State interface + func New(db *versiondb.Database) State + func NewMetered(db *versiondb.Database, namespace string, metrics prometheus.Registerer) (State, error)