Skip to content

Commit

Permalink
fix broken unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
hansieodendaal committed Oct 25, 2023
1 parent 6cb4e7c commit 7121b61
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions base_layer/core/src/base_node/sync/rpc/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ impl<B: BlockchainBackend + 'static> BaseNodeSyncService for BaseNodeSyncRpcServ
if db.fetch_block_by_hash(hash, true).await.is_err() {
return Err(RpcStatus::not_found("Requested end block sync hash was not found"));
}

if start_height > metadata.height_of_longest_chain() {
return Ok(Streaming::empty());
}

let end_header = db
.fetch_header_by_block_hash(hash)
.await
Expand Down

0 comments on commit 7121b61

Please sign in to comment.