Skip to content

Commit d72eb49

Browse files
fix: don't stop catchup on missing blocks (#178)
1 parent 2b319ee commit d72eb49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server/p2p/network.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,12 +1494,12 @@ where S: ShareChain
14941494
is_from_new_block_notify: false,
14951495
};
14961496
let _ = tx.send(InnerRequest::DoSyncChain(sync_share_chain));
1497-
return;
1497+
// return;
14981498
}
14991499

15001500
info!(target: SYNC_REQUEST_LOG_TARGET, squad = &squad; "Synced blocks added to share chain");
15011501
let our_pow = share_chain.get_total_chain_pow().await;
1502-
let mut must_continue_sync = missing_blocks.is_empty() && their_pow > our_pow.as_u128();
1502+
let mut must_continue_sync = their_pow > our_pow.as_u128();
15031503
info!(target: SYNC_REQUEST_LOG_TARGET, "[{:?}] must continue: {}", algo, must_continue_sync);
15041504
// Check if we have recieved their tip
15051505
if blocks.iter().any(|b| b.hash == their_tip_hash) {

0 commit comments

Comments
 (0)