Class MerkleTrieExtensions
An extension class to provide some convenient methods to deal with Merkle
Inherited Members
Namespace: Libplanet.Store.Trie
Assembly: Libplanet.dll
Syntax
public static class MerkleTrieExtensions
Methods
| Improve this Doc View SourceDifferentNodes(MerkleTrie, MerkleTrie)
Compares two given tries and gets different value nodes (leaf node).
Declaration
public static IEnumerable<IGrouping<string, (HashDigest<SHA256> Root, IValue Value)>> DifferentNodes(this MerkleTrie origin, MerkleTrie other)
Parameters
Type | Name | Description |
---|---|---|
Merkle |
origin | A trie to compare. |
Merkle |
other | An other trie to compare. |
Returns
Type | Description |
---|---|
IEnumerable<IGrouping<String, (T1, T2)<Hash |
IGrouping<TKey,TElement>s, mapping path to tuple having the hash of the value is contained and the value. |
ListAllStates(MerkleTrie)
Lists the all states key and the all states in the given merkleTrie
.
Declaration
public static IEnumerable<KeyValuePair<ImmutableArray<byte>, IValue>> ListAllStates(this MerkleTrie merkleTrie)
Parameters
Type | Name | Description |
---|---|---|
Merkle |
merkleTrie | A trie to discover. |
Returns
Type | Description |
---|---|
IEnumerable<Key |
All state keys and the all states. |