Documentation ¶
Index ¶
- Variables
- type ChainDB
- func (chainDB *ChainDB) DB() ethdb.Database
- func (chainDB *ChainDB) DeleteBlock(hash common.Hash, number uint64)
- func (chainDB *ChainDB) DeleteBlockHashByNumber(number uint64)
- func (chainDB *ChainDB) DeleteBody(hash common.Hash, number uint64)
- func (chainDB *ChainDB) DeleteHeader(hash common.Hash, number uint64)
- func (chainDB *ChainDB) DeleteHeaderNumber(hash common.Hash)
- func (chainDB *ChainDB) DeleteTxLookupEntry(block model.AbstractBlock)
- func (chainDB *ChainDB) GetBlock(hash common.Hash, number uint64) model.AbstractBlock
- func (chainDB *ChainDB) GetBlockHashByNumber(number uint64) common.Hash
- func (chainDB *ChainDB) GetBody(hash common.Hash, number uint64) model.AbstractBody
- func (chainDB *ChainDB) GetBodyRLP(hash common.Hash, number uint64) rlp.RawValue
- func (chainDB *ChainDB) GetHeadBlockHash() common.Hash
- func (chainDB *ChainDB) GetHeadHeaderHash() common.Hash
- func (chainDB *ChainDB) GetHeader(hash common.Hash, number uint64) model.AbstractHeader
- func (chainDB *ChainDB) GetHeaderNumber(hash common.Hash) *uint64
- func (chainDB *ChainDB) GetHeaderRLP(hash common.Hash, number uint64) rlp.RawValue
- func (chainDB *ChainDB) GetTransaction(txHash common.Hash) (model.AbstractTransaction, common.Hash, uint64, uint64)
- func (chainDB *ChainDB) GetTxLookupEntry(txHash common.Hash) (common.Hash, uint64, uint64)
- func (chainDB *ChainDB) HasBody(hash common.Hash, number uint64) bool
- func (chainDB *ChainDB) HasHeader(hash common.Hash, number uint64) bool
- func (chainDB *ChainDB) InsertBlock(block model.AbstractBlock) error
- func (chainDB *ChainDB) SaveBlock(block model.AbstractBlock)
- func (chainDB *ChainDB) SaveBlockHash(hash common.Hash, number uint64)
- func (chainDB *ChainDB) SaveBody(hash common.Hash, number uint64, body model.AbstractBody)
- func (chainDB *ChainDB) SaveBodyRLP(hash common.Hash, number uint64, rlp rlp.RawValue)
- func (chainDB *ChainDB) SaveHeadBlockHash(hash common.Hash)
- func (chainDB *ChainDB) SaveHeadHeaderHash(hash common.Hash)
- func (chainDB *ChainDB) SaveHeader(header model.AbstractHeader)
- func (chainDB *ChainDB) SaveHeaderNumber(hash common.Hash, number uint64)
- func (chainDB *ChainDB) SaveHeaderRLP(hash common.Hash, number uint64, rlp rlp.RawValue)
- func (chainDB *ChainDB) SaveTxLookupEntries(block model.AbstractBlock)
- type Database
- type DatabaseDeleter
- type DatabaseReader
- type DatabaseWriter
- type TxLookupEntry
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Chain index prefixes (use `i` + single byte to avoid mixing data types). BloomBitsIndexPrefix = []byte("iB") // BloomBitsIndexPrefix is the data table of a chain indexer to track its progress )
The fields below define the low level database schema prefixing.
Functions ¶
This section is empty.
Types ¶
type ChainDB ¶
type ChainDB struct {
// contains filtered or unexported fields
}
func NewChainDB ¶
func NewChainDB(db ethdb.Database, decoder model.BlockDecoder) *ChainDB
func (*ChainDB) DeleteBlockHashByNumber ¶
func (*ChainDB) DeleteHeader ¶
func (*ChainDB) DeleteHeaderNumber ¶
func (*ChainDB) DeleteTxLookupEntry ¶
func (chainDB *ChainDB) DeleteTxLookupEntry(block model.AbstractBlock)
func (*ChainDB) GetBlockHashByNumber ¶
func (*ChainDB) GetBodyRLP ¶
func (*ChainDB) GetHeadBlockHash ¶
func (*ChainDB) GetHeadHeaderHash ¶
func (*ChainDB) GetHeaderRLP ¶
func (*ChainDB) GetTransaction ¶
func (*ChainDB) GetTxLookupEntry ¶
func (*ChainDB) InsertBlock ¶
func (chainDB *ChainDB) InsertBlock(block model.AbstractBlock) error
func (*ChainDB) SaveBlock ¶
func (chainDB *ChainDB) SaveBlock(block model.AbstractBlock)
func (*ChainDB) SaveBlockHash ¶
func (*ChainDB) SaveBodyRLP ¶
func (*ChainDB) SaveHeadBlockHash ¶
func (*ChainDB) SaveHeadHeaderHash ¶
func (*ChainDB) SaveHeader ¶
func (chainDB *ChainDB) SaveHeader(header model.AbstractHeader)
func (*ChainDB) SaveHeaderNumber ¶
func (*ChainDB) SaveHeaderRLP ¶
func (*ChainDB) SaveTxLookupEntries ¶
func (chainDB *ChainDB) SaveTxLookupEntries(block model.AbstractBlock)
type Database ¶
type Database interface { DB() ethdb.Database GetBlockHashByNumber(number uint64) common.Hash SaveBlockHash(hash common.Hash, number uint64) DeleteBlockHashByNumber(number uint64) GetHeaderNumber(hash common.Hash) *uint64 SaveHeaderNumber(hash common.Hash, number uint64) DeleteHeaderNumber(hash common.Hash) GetHeadHeaderHash() common.Hash SaveHeadHeaderHash(hash common.Hash) GetHeadBlockHash() common.Hash SaveHeadBlockHash(hash common.Hash) GetHeaderRLP(hash common.Hash, number uint64) rlp.RawValue SaveHeaderRLP(hash common.Hash, number uint64, rlp rlp.RawValue) HasHeader(hash common.Hash, number uint64) bool GetHeader(hash common.Hash, number uint64) model.AbstractHeader SaveHeader(header model.AbstractHeader) DeleteHeader(hash common.Hash, number uint64) GetBodyRLP(hash common.Hash, number uint64) rlp.RawValue SaveBodyRLP(hash common.Hash, number uint64, rlp rlp.RawValue) HasBody(hash common.Hash, number uint64) bool GetBody(hash common.Hash, number uint64) model.AbstractBody SaveBody(hash common.Hash, number uint64, body model.AbstractBody) DeleteBody(hash common.Hash, number uint64) GetBlock(hash common.Hash, number uint64) model.AbstractBlock SaveBlock(block model.AbstractBlock) DeleteBlock(hash common.Hash, number uint64) GetTxLookupEntry(txHash common.Hash) (common.Hash, uint64, uint64) SaveTxLookupEntries(block model.AbstractBlock) DeleteTxLookupEntry(block model.AbstractBlock) GetTransaction(txHash common.Hash) (model.AbstractTransaction, common.Hash, uint64, uint64) InsertBlock(block model.AbstractBlock) error }
type DatabaseDeleter ¶
DatabaseDeleter wraps the Delete method of a backing data store.
type DatabaseReader ¶
type DatabaseWriter ¶
DatabaseWriter wraps the Put method of a backing data store.
Click to show internal directories.
Click to hide internal directories.