Created
June 20, 2020 02:52
-
-
Save gabrocheleau/e44683f4d29021fb94b1e10a47705b08 to your computer and use it in GitHub Desktop.
Markdium-Ethereum's Merkle Patricia Trees
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
await trie.put(Buffer.from('testKey'), Buffer.from('testValue')) | |
await trie.put(Buffer.from('testKey0001'), Buffer.from('testValue0')) | |
await trie.put(Buffer.from('testKey000A'), Buffer.from('testValueA')) | |
var node1 = await trie.findPath(Buffer.from('testKey')) // Looking up our branch node | |
console.log(node1.node) // The branch node | |
// RESULT | |
BranchNode { | |
_branches: [ | |
, | |
, | |
, | |
, | |
, | |
, | |
, | |
, | |
, | |
, | |
, | |
, | |
, | |
, | |
, | |
], | |
_value: | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment