mirror of
https://github.com/mimblewimble/grin.git
synced 2025-05-04 00:01:15 +03:00
Don't stall sync when header chain regresses (#1644)
This should normally never happen but this is meant to catch unforeseen edge cases or block acceptance bugs.
This commit is contained in:
parent
497d66e482
commit
2919a78b0f
1 changed files with 1 additions and 1 deletions
|
@ -743,7 +743,7 @@ impl SyncInfo {
|
|||
let all_headers_received =
|
||||
header_head.height >= prev_height + (p2p::MAX_BLOCK_HEADERS as u64) - 4;
|
||||
// no headers processed and we're past timeout, need to ask for more
|
||||
let stalling = header_head.height == latest_height && now > timeout;
|
||||
let stalling = header_head.height <= latest_height && now > timeout;
|
||||
|
||||
// always enable header sync on initial state transition from NoSync / Initial
|
||||
let force_sync = match sync_state.status() {
|
||||
|
|
Loading…
Add table
Reference in a new issue