Documentation ¶
Index ¶
- Constants
- func PrefixKey(prefix string, str string) string
- type BlockchainDB
- func (bdb *BlockchainDB) GetBlockByHash(hash *util.Hash) (*types.Block, error)
- func (bdb *BlockchainDB) GetBlockByNumber(number *big.Int) (*types.Block, error)
- func (bdb *BlockchainDB) GetBlocksInRange(start uint, end uint) ([]*types.Block, error)
- func (bdb *BlockchainDB) GetLatestBlock() (*types.Block, error)
- type DB
- type StateDB
Constants ¶
View Source
const ( LastHashKey = "lh" // Last hash key ( lastHash -> hash) HashesKey = "hs" // Hashes key (hash->block) BlockNumberKey = "bn" // Block number key (blockNumber -> hash) BalanceKey = "bl" // Balance key (address -> balance) NonceKey = "nc" // Nonce key (address -> nonce) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlockchainDB ¶
type BlockchainDB struct {
DB *DB
}
func NewBlockchainDB ¶
func NewBlockchainDB(db *DB) *BlockchainDB
func (*BlockchainDB) GetBlockByHash ¶
func (*BlockchainDB) GetBlockByNumber ¶ added in v1.1.0
func (*BlockchainDB) GetBlocksInRange ¶
func (*BlockchainDB) GetLatestBlock ¶
func (bdb *BlockchainDB) GetLatestBlock() (*types.Block, error)
type DB ¶
DB is a wrapper around leveldb.
func NewDBInstance ¶
NewDB creates a new DB instance.
Click to show internal directories.
Click to hide internal directories.