Versions in this module Expand all Collapse all v1 v1.1.0 Oct 24, 2023 Changes in this version type BlockchainDB + func (bdb *BlockchainDB) GetBlockByNumber(number *big.Int) (*types.Block, error) v1.0.0 Oct 17, 2023 Changes in this version + const BalanceKey + const BlockNumberKey + const HashesKey + const LastHashKey + const NonceKey + func PrefixKey(prefix string, str string) string + type BlockchainDB struct + DB *DB + func NewBlockchainDB(db *DB) *BlockchainDB + func (bdb *BlockchainDB) GetBlockByHash(hash *util.Hash) (*types.Block, error) + func (bdb *BlockchainDB) GetBlocksInRange(start uint, end uint) ([]*types.Block, error) + func (bdb *BlockchainDB) GetLatestBlock() (*types.Block, error) + type DB struct + LevelDb *leveldb.DB + func NewDBInstance(dbPath string) (*DB, error) + func (db *DB) Close() error + func (db *DB) Delete(key string) error + func (db *DB) Get(key string) ([]byte, error) + func (db *DB) Has(key string) (bool, error) + func (db *DB) NewBatch() *leveldb.Batch + func (db *DB) Put(key string, value []byte) error + func (db *DB) WriteBatch(batch *leveldb.Batch) error + type StateDB struct + DB *DB + func NewStateDB(db *DB) *StateDB