|
CatapultServer
v0.5.0.1 (Elephant)
|
A delta on top of a base patricia tree that offers methods to set/unset nodes. More...

Public Member Functions | |
| BasePatriciaTreeDelta (const TDataSource &dataSource, const Hash256 &rootHash) | |
| Creates a tree around a dataSource with root rootHash. More... | |
| Hash256 | root () const |
| Gets the root hash that uniquely identifies this tree. More... | |
| Hash256 | baseRoot () const |
| Gets the base root hash that identifies this tree before any changes are applied. More... | |
| void | reset (const Hash256 &rootHash) |
| Sets the root hash (rootHash). More... | |
| void | set (const KeyType &key, const ValueType &value) |
| Sets key to value in the tree. More... | |
| bool | unset (const KeyType &key) |
| Removes the value associated with key from the tree. More... | |
| void | setCheckpoint () |
| Marks all nodes reachable at this point. More... | |
| template<typename TDestinationDataSource > | |
| void | copyPendingChangesTo (TDestinationDataSource &dataSource) const |
| Copies all pending changes to dataSource. More... | |
| template<typename TTree > | |
| void | copyRootTo (TTree &tree) const |
| Sets the root of tree to the root of this delta tree. More... | |
Private Types | |
| using | KeyType = typename TEncoder::KeyType |
| using | ValueType = typename TEncoder::ValueType |
Private Attributes | |
| ReadThroughMemoryDataSource< TDataSource > | m_dataSource |
| Hash256 | m_baseRootHash |
| PatriciaTree< TEncoder, ReadThroughMemoryDataSource< TDataSource > > | m_tree |
A delta on top of a base patricia tree that offers methods to set/unset nodes.
|
private |
|
private |
|
inlineexplicit |
Creates a tree around a dataSource with root rootHash.
|
inline |
Gets the base root hash that identifies this tree before any changes are applied.
|
inline |
Copies all pending changes to dataSource.

|
inline |
Sets the root of tree to the root of this delta tree.

|
inline |
Sets the root hash (rootHash).
|
inline |
Gets the root hash that uniquely identifies this tree.

|
inline |
Sets key to value in the tree.
|
inline |
Marks all nodes reachable at this point.
|
inline |
Removes the value associated with key from the tree.
|
private |
|
private |
|
private |