Skip to content

Commit

Permalink
Remove double-locking deadlock from HTTP API
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed Aug 31, 2023
1 parent e99ba3a commit 33c1cfa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions beacon_node/http_api/src/state_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ impl StateId {
} else {
// This block is either old and finalized, or recent and unfinalized, so
// it's safe to fallback to the optimistic status of the finalized block.
chain
.canonical_head
.fork_choice_read_lock()
fork_choice
.is_optimistic_or_invalid_block(&hot_summary.latest_block_root)
.map_err(BeaconChainError::ForkChoiceError)
.map_err(warp_utils::reject::beacon_chain_error)?
Expand Down

0 comments on commit 33c1cfa

Please sign in to comment.