Skip to content

Commit

Permalink
fix: stop sync if errors
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasArrachea committed Feb 13, 2025
1 parent f43e5f9 commit 7a765b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/store/src/server/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ impl api_server::Api for StoreApi {
.as_ref()
.ok()
.and_then(|r| r.block_header)
.map_or(false, |header| header.block_num > request.block_num)
.map_or(true, |header| header.block_num > request.block_num)
{
break;
}

let is_last_response = result.as_ref().ok().map_or(false, |r| {
let is_last_response = result.as_ref().ok().map_or(true, |r| {
r.block_header
.as_ref()
.map_or(false, |header| header.block_num == latest_block_num)
Expand Down

0 comments on commit 7a765b2

Please sign in to comment.