Access to the block database (blocks/index/)
Synopsis
Declared in <node/blockstorage.h>
class BlockTreeDB
: public CDBWrapper
Base Classes
Name |
Description |
Wraps a LevelDB database, providing typed, serialized key‐value access. |
Member Functions
Name |
Description |
|
Copy assignment is disabled. |
Perform a blocking full compaction of the underlying LevelDB. |
|
Get an estimate of LevelDB memory usage (in bytes). |
|
Removes the value stored under the given key. |
|
Estimates the on‐disk size of the entries in the given key range. |
|
Checks whether a value is stored under the given key. |
|
Return a LevelDB property value, if available. |
|
Return true if the database managed by this class contains no entries. |
|
Load every block‐index entry from the database into memory. |
|
Creates a new iterator over the database. The caller owns the returned iterator. |
|
Reads and de‐obfuscates the value stored under the given key. |
|
Read the stored info for one block file. |
|
Read a named boolean flag. |
|
Read the number of the last block file in use. |
|
Read whether a reindex was in progress. |
|
Writes a single key‐value pair to the database. |
|
Atomically applies all writes and erases queued in a batch. |
|
Atomically write block‐file info, the last‐file marker, and block‐index entries. |
|
Persist a named boolean flag. |
|
Persist whether a reindex is in progress. |
Static Member Functions
Name |
Description |
Probe an unopened database for a key prefix. Return true if a database at path exists and contains at least 1 entry beginning with prefix; missing or empty databases return false, and database errors throw dbwrapper_error. |
Using Declarations
Name |
Description |
Inherit the CDBWrapper constructors to open the underlying database. |
Non-Member Functions
Name |
Description |
|
Work around circular dependency, as well as for testing in dbwrapper_tests. Database obfuscation should be considered an implementation detail of the specific database. |
Look up a single index entry for a block, trying the height index then the hash index. |
Created with MrDocs