Skip to content

Commit

Permalink
swap unnecessary write lock to read lock in block_verification (sigp#…
Browse files Browse the repository at this point in the history
…4340)

## Issue Addressed

[sigp#4334](sigp#4334)

## Proposed Changes

swap unnecessary write lock to read lock

## Additional Info

N/A


Co-authored-by: Michael Sproul <micsproul@gmail.com>
  • Loading branch information
2 people authored and divagant-martian committed Jun 7, 2023
1 parent c15049d commit 402386d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/src/block_verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ impl<T: BeaconChainTypes> GossipVerifiedBlock<T> {
// We check this *before* we load the parent so that we can return a more detailed error.
check_block_is_finalized_checkpoint_or_descendant(
chain,
&chain.canonical_head.fork_choice_write_lock(),
&chain.canonical_head.fork_choice_read_lock(),
&block,
)?;

Expand Down

0 comments on commit 402386d

Please sign in to comment.