Skip to content

Instantly share code, notes, and snippets.

@gabrocheleau
Created June 20, 2020 02:52
Show Gist options
  • Save gabrocheleau/e44683f4d29021fb94b1e10a47705b08 to your computer and use it in GitHub Desktop.
Save gabrocheleau/e44683f4d29021fb94b1e10a47705b08 to your computer and use it in GitHub Desktop.
Markdium-Ethereum's Merkle Patricia Trees
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