From 8c718443efdfe3a9db1951b071ede83531c19525 Mon Sep 17 00:00:00 2001 From: Ignotus Peverell Date: Sat, 9 Dec 2017 21:43:42 +0000 Subject: [PATCH] Explicit error when a forked block can't be retrieved --- chain/src/pipe.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chain/src/pipe.rs b/chain/src/pipe.rs index 056a144c6..4249f53a8 100644 --- a/chain/src/pipe.rs +++ b/chain/src/pipe.rs @@ -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)?;