Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

util/patricia_tree eliminate expect() #8222

Closed
niklasad1 opened this issue Mar 26, 2018 · 1 comment
Closed

util/patricia_tree eliminate expect() #8222

niklasad1 opened this issue Mar 26, 2018 · 1 comment
Assignees
Labels
F8-enhancement 🎊 An additional feature request. P7-nicetohave 🐕 Issue is worth doing eventually. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Milestone

Comments

@niklasad1
Copy link
Collaborator

https://github.com/paritytech/parity/blob/master/util/patricia_trie/src/lookup.rs#L58

@niklasad1 niklasad1 added F8-enhancement 🎊 An additional feature request. P7-nicetohave 🐕 Issue is worth doing eventually. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow. labels Mar 26, 2018
@5chdn 5chdn modified the milestones: 1.11, 1.12 Mar 26, 2018
@ascjones
Copy link
Contributor

I added this as part of #8033. Originally the call to Node::decoded was unsafe for invalid rlp, because of the unwraps in Rlp e.g. https://github.com/paritytech/parity/blob/master/util/rlp/src/rlpin.rs#L126

The DecoderErrors are now propogated and can be handled further up. In this case I originally added a DecoderError case to TrieError but ran into a couple of issues and decided to add the expect for expediency, reasoning that it behaves at worst as badly as before.

Now the wider changes are nearly done I can look at this again (or someone else). IIRC the slight issues I had were about the data to store in the DecoderError case since it is not Clonable, and the H256 key is not always available in the context. So should be simple once this is figured out.

@5chdn 5chdn modified the milestones: 1.12, 1.13 Apr 24, 2018
@dvdplm dvdplm self-assigned this May 3, 2018
@dvdplm dvdplm mentioned this issue May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F8-enhancement 🎊 An additional feature request. P7-nicetohave 🐕 Issue is worth doing eventually. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Projects
None yet
Development

No branches or pull requests

4 participants