ensure meta is actually in the right column and sanity check on iterator (#820)

This commit is contained in:
Robert Habermeier
2018-09-27 16:05:24 +01:00
committed by Gav Wood
parent e5b48030b5
commit a3285e43f6
3 changed files with 6 additions and 5 deletions
+1
View File
@@ -82,6 +82,7 @@ impl<H, N> LeafSet<H, N> where
let mut storage = BTreeSet::new();
for (key, value) in db.iter_from_prefix(column, prefix) {
if !key.starts_with(prefix) { break }
let raw_hash = &mut &key[prefix.len()..];
let hash = match Decode::decode(raw_hash) {
Some(hash) => hash,