Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface {
Close() error
GetBlock(hash chainhash.Hash) (*primitives.Block, error)
GetRawBlock(hash chainhash.Hash) ([]byte, error)
AddRawBlock(block *primitives.Block) error
SetTip(c chainhash.Hash) error
GetTip() (chainhash.Hash, error)
SetFinalizedState(s state.State) error
GetFinalizedState() (state.State, error)
SetJustifiedState(s state.State) error
GetJustifiedState() (state.State, error)
SetBlockRow(disk *primitives.BlockNodeDisk) error
GetBlockRow(c chainhash.Hash) (*primitives.BlockNodeDisk, error)
SetJustifiedHead(c chainhash.Hash) error
GetJustifiedHead() (chainhash.Hash, error)
SetFinalizedHead(c chainhash.Hash) error
GetFinalizedHead() (chainhash.Hash, error)
SetGenesisTime(t time.Time) error
GetGenesisTime() (time.Time, error)
}
func NewLevelDB ¶
NewLevelDB returns a database instance for storing blocks.
Click to show internal directories.
Click to hide internal directories.