Minor performance fix
This commit is contained in:
parent
e7edd14eab
commit
9946abb12d
|
@ -116,9 +116,11 @@ impl BlockInformationStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
// update latest block
|
// update latest block
|
||||||
let latest_block = self.get_latest_block_arc(commitment_config);
|
{
|
||||||
if slot > latest_block.read().await.slot {
|
let latest_block = self.get_latest_block_arc(commitment_config);
|
||||||
*latest_block.write().await = block_info.clone();
|
if slot > latest_block.read().await.slot {
|
||||||
|
*latest_block.write().await = block_info.clone();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
match self.blocks.entry(block_info.blockhash) {
|
match self.blocks.entry(block_info.blockhash) {
|
||||||
|
|
Loading…
Reference in New Issue