Header check before asking previous on orphan not needed. Fast sync now properly keeps the syncing flag on.
@@ -401,11 +401,9 @@ impl NetToChainAdapter {
Err(chain::Error::Orphan) => {
// make sure we did not miss the parent block
if !chain.is_orphan(&prev_hash) && !self.currently_syncing.load(Ordering::Relaxed) {
- if let Err(_) = chain.get_block_header(&prev_hash) {
debug!(LOGGER, "adapter: process_block: received an orphan block, checking the parent: {:}", prev_hash);
self.request_block_by_hash(prev_hash, &addr)
}
- }
true
}
Err(ref e) if e.is_bad_data() => {
