Explicit error when a forked block can't be retrieved

This commit is contained in:
Ignotus Peverell 2017-12-09 21:43:42 +00:00
parent 6ba22e71c8
commit 8c718443ef
No known key found for this signature in database
GPG key ID: 99CD25F39F8F8211

View file

@ -268,7 +268,9 @@ fn validate_block(
// apply all forked blocks, including this new one
for h in hashes {
let fb = ctx.store.get_block(&h)?;
let fb = ctx.store.get_block(&h).map_err(|e| {
Error::StoreErr(e, format!("getting forked blocks"))
})?;
ext.apply_block(&fb)?;
}
ext.apply_block(&b)?;