Documentation
¶
Index ¶
- type BlocksApplier
- func (a *BlocksApplier) Apply(state state.State, blocks []*proto.Block) (proto.Height, error)
- func (a *BlocksApplier) ApplyMicro(state state.State, block *proto.Block) (proto.Height, error)
- func (a *BlocksApplier) ApplyMicroWithSnapshots(state state.State, block *proto.Block, snapshot *proto.BlockSnapshot) (proto.Height, error)
- func (a *BlocksApplier) ApplyWithSnapshots(state state.State, blocks []*proto.Block, snapshots []*proto.BlockSnapshot) (proto.Height, error)
- func (a *BlocksApplier) BlockExists(state state.State, block *proto.Block) (bool, error)
- type MockStateManager
- func (a *MockStateManager) AddDeserializedBlock(block *proto.Block) (*proto.Block, error)
- func (a *MockStateManager) AddDeserializedBlocks(blocks []*proto.Block) (*proto.Block, error)
- func (a *MockStateManager) AddDeserializedBlocksWithSnapshots(blocks []*proto.Block, snapshots []*proto.BlockSnapshot) (*proto.Block, error)
- func (a *MockStateManager) Block(blockID proto.BlockID) (*proto.Block, error)
- func (a *MockStateManager) BlockByHeight(height proto.Height) (*proto.Block, error)
- func (a *MockStateManager) BlockIDToHeight(blockID proto.BlockID) (uint64, error)
- func (a *MockStateManager) CheckRollbackHeightAuto(height proto.Height) error
- func (a *MockStateManager) Close() error
- func (a *MockStateManager) CurrentScore() (*big.Int, error)
- func (a *MockStateManager) Height() (proto.Height, error)
- func (a *MockStateManager) IsActivated(_ int16) (bool, error)
- func (a *MockStateManager) IsApproved(_ int16) (bool, error)
- func (a *MockStateManager) RollbackToHeight(height uint64, _ bool) error
- func (a *MockStateManager) ScoreAtHeight(height uint64) (*big.Int, error)
- func (a *MockStateManager) SnapshotsAtHeight(h proto.Height) (proto.BlockSnapshot, error)
- func (a *MockStateManager) StartProvidingExtendedApi() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlocksApplier ¶
type BlocksApplier struct {
// contains filtered or unexported fields
}
func NewBlocksApplier ¶
func NewBlocksApplier() *BlocksApplier
func (*BlocksApplier) ApplyMicro ¶ added in v0.8.8
func (*BlocksApplier) ApplyMicroWithSnapshots ¶ added in v0.11.0
func (a *BlocksApplier) ApplyMicroWithSnapshots( state state.State, block *proto.Block, snapshot *proto.BlockSnapshot, ) (proto.Height, error)
func (*BlocksApplier) ApplyWithSnapshots ¶ added in v0.11.0
func (a *BlocksApplier) ApplyWithSnapshots( state state.State, blocks []*proto.Block, snapshots []*proto.BlockSnapshot, ) (proto.Height, error)
func (*BlocksApplier) BlockExists ¶ added in v0.8.8
type MockStateManager ¶
func NewMockStateManager ¶
func NewMockStateManager(blocks ...*proto.Block) (*MockStateManager, error)
func (*MockStateManager) AddDeserializedBlock ¶
func (*MockStateManager) AddDeserializedBlocks ¶ added in v0.10.0
func (*MockStateManager) AddDeserializedBlocksWithSnapshots ¶ added in v0.11.0
func (a *MockStateManager) AddDeserializedBlocksWithSnapshots( blocks []*proto.Block, snapshots []*proto.BlockSnapshot, ) (*proto.Block, error)
func (*MockStateManager) BlockByHeight ¶
func (*MockStateManager) BlockIDToHeight ¶
func (a *MockStateManager) BlockIDToHeight(blockID proto.BlockID) (uint64, error)
func (*MockStateManager) CheckRollbackHeightAuto ¶ added in v0.11.0
func (a *MockStateManager) CheckRollbackHeightAuto(height proto.Height) error
func (*MockStateManager) Close ¶
func (a *MockStateManager) Close() error
func (*MockStateManager) CurrentScore ¶
func (a *MockStateManager) CurrentScore() (*big.Int, error)
func (*MockStateManager) IsActivated ¶
func (a *MockStateManager) IsActivated(_ int16) (bool, error)
func (*MockStateManager) IsApproved ¶
func (a *MockStateManager) IsApproved(_ int16) (bool, error)
func (*MockStateManager) RollbackToHeight ¶
func (a *MockStateManager) RollbackToHeight(height uint64, _ bool) error
func (*MockStateManager) ScoreAtHeight ¶
func (a *MockStateManager) ScoreAtHeight(height uint64) (*big.Int, error)
func (*MockStateManager) SnapshotsAtHeight ¶ added in v0.11.0
func (a *MockStateManager) SnapshotsAtHeight(h proto.Height) (proto.BlockSnapshot, error)
func (*MockStateManager) StartProvidingExtendedApi ¶
func (a *MockStateManager) StartProvidingExtendedApi() error
Click to show internal directories.
Click to hide internal directories.