package
1.0.0
Repository: https://github.com/youchainhq/go-youchain.git
Documentation: pkg.go.dev

# Functions

DeleteBlock removes all block data associated with a hash.
DeleteBody removes all block body data associated with a hash.
DeleteCanonicalHash removes the number to hash canonical mapping.
DeleteHeader removes all block header data associated with a hash.
DeleteReceipts removes all receipt data associated with a block hash.
DeleteTxLookupEntry removes all transaction data associated with a hash.
FindCommonAncestor returns the last common ancestor of two block headers.
GetBloomTrieRoot reads the BloomTrie root assoctiated to the given section from the database.
GetChtRoot reads the CHT root associated to the given section from the database.
HasBody verifies the existence of a block body corresponding to the hash.
HasHeader verifies the existence of a block header corresponding to the hash.
No description provided by the author
ReadBlock retrieves an entire block corresponding to the hash, assembling it back from the stored header and body.
ReadBloomBits retrieves the compressed bloom bit vector belonging to the given section and bit index from the.
ReadBody retrieves the block body corresponding to the hash.
ReadBodyRLP retrieves the block body (transactions and uncles) in RLP encoding.
ReadCanonicalHash retrieves the hash assigned to a canonical block number.
ReadDatabaseVersion retrieves the version number of the database.
No description provided by the author
ReadFastTrieProgress retrieves the number of tries nodes fast synced to allow reporting correct numbers across restarts.
No description provided by the author
ReadFullOriginBlockNumber retrieves the origin number that starting full sync.
ReadHeadBlockHash retrieves the hash of the current canonical head block.
ReadHeader retrieves the block header corresponding to the hash.
ReadHeaderNumber returns the header number assigned to a hash.
ReadHeaderRLP retrieves a block header in its raw RLP database encoding.
ReadHeadHeaderHash retrieves the hash of the current canonical head header.
ReadLightStartHeaderHash retrieves the hash of the start header of a light-client.
ReadNetworkId retrieves the consensus settings based on the given genesis hash.
ReadReceipt retrieves a specific transaction receipt from the database, along with its added positional metadata.
ReadReceipts retrieves all the transaction receipts belonging to a block.
ReadTransaction retrieves a specific transaction from the database, along with its added positional metadata.
ReadTxLookupEntry retrieves the positional metadata associated with a transaction hash to allow retrieving the transaction or receipt by hash.
StoreBloomTrieRoot writes the BloomTrie root assoctiated to the given section into the database.
StoreChtRoot writes the CHT root associated to the given section into the database.
WriteBlock serializes a block into the database, header and body separately.
WriteBloomBits stores the compressed bloom bits vector belonging to the given section and bit index.
WriteBody storea a block body into the database.
WriteBodyRLP stores an RLP encoded block body into the database.
WriteCanonicalHash stores the hash assigned to a canonical block number.
WriteDatabaseVersion stores the version number of the database.
No description provided by the author
WriteFastTrieProgress stores the fast sync trie process counter to support retrieving it across restarts.
No description provided by the author
WriteFullOriginBlockNumber stores the origin number that starting full sync.
WriteHeadBlockHash stores the head block's hash.
WriteHeader stores a block header into the database and also stores the hash- to-number mapping.
WriteHeadHeaderHash stores the hash of the current canonical head header.
WriteLightStartHeaderHash stores the hash of the current start header of a light-client.
WriteNetworkId writes the networkId to the database.
WriteReceipts stores all the transaction receipts belonging to a block.
WriteTxLookupEntries stores a positional metadata for every transaction from a block, enabling hash based transaction and receipt lookups.

# Variables

BloomBitsIndexPrefix is the data table of a chain indexer to track its progress.

# Structs

TxLookupEntry is a positional metadata to help looking up the data content of a transaction or receipt given only its hash.

# Interfaces

AcReader contains functions for the main consensus engine to read data about ACoCHT.
DatabaseDeleter wraps the Delete method of a backing data store.
DatabaseReader wraps the Has and Get method of a backing data store.
DatabaseWriter wraps the Put method of a backing data store.