fixed panic after verification fail during sync

This commit is contained in:
Svyatoslav Nikolsky 2016-12-02 15:12:00 +03:00
parent 14cde7adf9
commit 74cd2569bd
1 changed files with 3 additions and 2 deletions

View File

@ -162,7 +162,8 @@ fn execute_verification_task<T: VerificationSink, U: PreviousTransactionOutputPr
} }
}, },
Ok(Chain::Orphan) => { Ok(Chain::Orphan) => {
unreachable!("sync will never put orphaned blocks to verification queue"); // this can happen for B1 if B0 verification has failed && we have already scheduled verification of B0
sink.lock().on_block_verification_error(&format!("orphaned block because parent block verification has failed"), &block.hash())
}, },
Err(e) => { Err(e) => {
sink.lock().on_block_verification_error(&format!("{:?}", e), &block.hash()) sink.lock().on_block_verification_error(&format!("{:?}", e), &block.hash())