Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where deriven Default impl causes panics #9

Merged
merged 1 commit into from
Jul 12, 2018

Conversation

dvdplm
Copy link
Contributor

@dvdplm dvdplm commented Jul 11, 2018

Without this fix this code is a broken triedb:

let mut db = MemoryDB::<KeccakHasher>::default();
let mut root = H256::new();
let mut tdb = TrieDBMut::new(&mut db, &mut root);
tdb.insert(b"not your pony").unwrap() // <–– blows up because the MemoryDB is not properly init'd

Version bump: 0.2.1

Closes #8

Version bump: 0.2.1

Closes #8
@dvdplm dvdplm self-assigned this Jul 11, 2018
@dvdplm dvdplm changed the title Fix bug with derives Default impl Fix bug where deriven Default impl causes panics Jul 11, 2018
Copy link
Contributor

@ascjones ascjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@andresilva andresilva merged commit 4481687 into master Jul 12, 2018
@debris debris deleted the fix/implement-default-for-memorydb branch July 13, 2018 10:04
sorpaas pushed a commit that referenced this pull request Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MemoryDB can't derive default
3 participants