Skip to content

Commit

Permalink
fix(node): Compare only header hashes on syncer init (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
oblique authored Aug 13, 2024
1 parent 7ba4d0b commit 1fa3cb3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion node/src/syncer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,9 @@ where
//
// This can happen in case of fast node restart.
let try_insert = match store.get_head().await {
Ok(store_head) => store_head != network_head,
// `ExtendedHeader.commit.signatures` can be different set on each fetch
// so we compare only hashes.
Ok(store_head) => store_head.hash() != network_head.hash(),
Err(StoreError::NotFound) => true,
Err(e) => return Err(e.into()),
};
Expand Down

0 comments on commit 1fa3cb3

Please sign in to comment.