Skip to content

Commit

Permalink
Minor performance fix
Browse files Browse the repository at this point in the history
  • Loading branch information
godmodegalactus committed Mar 21, 2024
1 parent e7edd14 commit 9946abb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/src/stores/block_information_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,11 @@ impl BlockInformationStore {
}

// update latest block
let latest_block = self.get_latest_block_arc(commitment_config);
if slot > latest_block.read().await.slot {
*latest_block.write().await = block_info.clone();
{
let latest_block = self.get_latest_block_arc(commitment_config);
if slot > latest_block.read().await.slot {
*latest_block.write().await = block_info.clone();
}
}

match self.blocks.entry(block_info.blockhash) {
Expand Down

0 comments on commit 9946abb

Please sign in to comment.