-
Notifications
You must be signed in to change notification settings - Fork 89
emit error on missing node #5
Comments
triggered by new Trie(stateDb, '0000000000000000000000000000000000000000000000000000000000000000')
trie.createReadStream().pipe(out) |
of course I dont expect that to work, but i dont expect it to crash my program either |
right that won't work because the stateRoot '0000000000000000000000000000000000000000000000000000000000000000' doesn't exsist. |
@kumavis do you have any opoins on the expected behavior here? |
should throw an error on a non-existing state root, no? |
with the exception of the empty rlp stateRoot |
Is this sorted? |
no. I think we just need a better error message here |
related #12 |
Behavior of the current state of the library is to check for correctness of the provided Example code run: import { BaseTrie as Trie } from 'merkle-patricia-tree'
const trie = new Trie(null, Buffer.from('0000000000000000000000000000000000000000000000000000000000000000', 'hex'))
stream.on('data', (d: any) => {
console.log(d.key.toString())
console.log(d.value.toString())
})
stream.on('end', () => {
console.log('The end.')
}) Feel free to reopen if I haven't understand something correctly about the issue semantics. |
just blows up
The text was updated successfully, but these errors were encountered: