blocks_applier

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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) Apply

func (a *BlocksApplier) Apply(
	state state.State,
	blocks []*proto.Block,
) (proto.Height, error)

func (*BlocksApplier) ApplyMicro added in v0.8.8

func (a *BlocksApplier) ApplyMicro(
	state state.State,
	block *proto.Block,
) (proto.Height, error)

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

func (a *BlocksApplier) BlockExists(state state.State, block *proto.Block) (bool, error)

type MockStateManager

type MockStateManager struct {
	Peers_ []proto.TCPAddr
	// contains filtered or unexported fields
}

func NewMockStateManager

func NewMockStateManager(blocks ...*proto.Block) (*MockStateManager, error)

func (*MockStateManager) AddDeserializedBlock

func (a *MockStateManager) AddDeserializedBlock(block *proto.Block) (*proto.Block, error)

func (*MockStateManager) AddDeserializedBlocks added in v0.10.0

func (a *MockStateManager) AddDeserializedBlocks(
	blocks []*proto.Block,
) (*proto.Block, error)

func (*MockStateManager) AddDeserializedBlocksWithSnapshots added in v0.11.0

func (a *MockStateManager) AddDeserializedBlocksWithSnapshots(
	blocks []*proto.Block,
	snapshots []*proto.BlockSnapshot,
) (*proto.Block, error)

func (*MockStateManager) Block

func (a *MockStateManager) Block(blockID proto.BlockID) (*proto.Block, error)

func (*MockStateManager) BlockByHeight

func (a *MockStateManager) BlockByHeight(height proto.Height) (*proto.Block, error)

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) Height

func (a *MockStateManager) Height() (proto.Height, 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL