Documentation ¶
Index ¶
- Variables
- func GetLastStoredBlock(db KeyValueReader, chainID uint64) (*big.Int, error)
- func SetupBlockstore(generalConfig *config.GeneralChainConfig, kvdb KeyValueReaderWriter, ...) (*big.Int, error)
- func StoreBlock(db KeyValueWriter, block *big.Int, chainID uint64) error
- type KeyValueReader
- type KeyValueReaderWriter
- type KeyValueWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("key not found")
)
Functions ¶
func GetLastStoredBlock ¶
func GetLastStoredBlock(db KeyValueReader, chainID uint64) (*big.Int, error)
func SetupBlockstore ¶
func SetupBlockstore(generalConfig *config.GeneralChainConfig, kvdb KeyValueReaderWriter, startBlock *big.Int) (*big.Int, error)
SetupBlockstore queries the blockstore for the latest known block. If the latest block is greater than config.StartBlock, then config.StartBlock is replaced with the latest known block.
func StoreBlock ¶
func StoreBlock(db KeyValueWriter, block *big.Int, chainID uint64) error
Types ¶
type KeyValueReader ¶
type KeyValueReaderWriter ¶
type KeyValueReaderWriter interface { KeyValueReader KeyValueWriter }
type KeyValueWriter ¶
Click to show internal directories.
Click to hide internal directories.