Merkle Patricia Tree "Trie": a modifed base-16 Radix tree. This version uses a database backend. Usage:
More...
|
| | GenericTrieDB (DB *_db=nullptr) |
| |
| | GenericTrieDB (DB *_db, h256 const &_root, Verification _v=Verification::Normal) |
| |
| | ~GenericTrieDB () |
| |
| void | open (DB *_db) |
| |
| void | open (DB *_db, h256 const &_root, Verification _v=Verification::Normal) |
| |
| void | init () |
| |
| void | setRoot (h256 const &_root, Verification _v=Verification::Normal) |
| |
| bool | isNull () const |
| | True if the trie is uninitialised (i.e. that the DB doesn't contain the root node). More...
|
| |
| bool | isEmpty () const |
| | True if the trie is initialised but empty (i.e. that the DB contains the root node which is empty). More...
|
| |
| h256 const & | root () const |
| |
| std::string | at (bytes const &_key) const |
| |
| std::string | at (bytesConstRef _key) const |
| |
| void | insert (bytes const &_key, bytes const &_value) |
| |
| void | insert (bytesConstRef _key, bytes const &_value) |
| |
| void | insert (bytes const &_key, bytesConstRef _value) |
| |
| void | insert (bytesConstRef _key, bytesConstRef _value) |
| |
| void | remove (bytes const &_key) |
| |
| void | remove (bytesConstRef _key) |
| |
| bool | contains (bytes const &_key) const |
| |
| bool | contains (bytesConstRef _key) const |
| |
| iterator | begin () const |
| |
| iterator | end () const |
| |
| iterator | lower_bound (bytesConstRef _key) const |
| |
| void | descendKey (h256 const &_k, h256Hash &_keyMask, bool _wasExt, std::ostream *_out, int _indent=0) const |
| | Used for debugging, scans the whole trie. More...
|
| |
| void | descendEntry (RLP const &_r, h256Hash &_keyMask, bool _wasExt, std::ostream *_out, int _indent) const |
| | Used for debugging, scans the whole trie. More...
|
| |
| void | descendList (RLP const &_r, h256Hash &_keyMask, bool _wasExt, std::ostream *_out, int _indent) const |
| | Used for debugging, scans the whole trie. More...
|
| |
| h256Hash | leftOvers (std::ostream *_out=nullptr) const |
| | Used for debugging, scans the whole trie. More...
|
| |
| void | debugStructure (std::ostream &_out) const |
| | Used for debugging, scans the whole trie. More...
|
| |
| bool | check (bool _requireNoLeftOvers) const |
| |
| DB const * | db () const |
| |
| DB * | db () |
| |
template<class _DB>
class dev::GenericTrieDB< _DB >
Merkle Patricia Tree "Trie": a modifed base-16 Radix tree. This version uses a database backend. Usage:
GenericTrieDB<MyDB> t(&myDB);
assert(t.isNull());
t.init();
assert(t.isEmpty());
t.insert(x, y);
assert(t.at(x) == y.toString());
t.remove(x);
assert(t.isEmpty());
Definition at line 56 of file TrieDB.h.