Skip to content

Commit 33c1cfa

Browse files
committed
Remove double-locking deadlock from HTTP API
1 parent e99ba3a commit 33c1cfa

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

beacon_node/http_api/src/state_id.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ impl StateId {
8989
} else {
9090
// This block is either old and finalized, or recent and unfinalized, so
9191
// it's safe to fallback to the optimistic status of the finalized block.
92-
chain
93-
.canonical_head
94-
.fork_choice_read_lock()
92+
fork_choice
9593
.is_optimistic_or_invalid_block(&hot_summary.latest_block_root)
9694
.map_err(BeaconChainError::ForkChoiceError)
9795
.map_err(warp_utils::reject::beacon_chain_error)?

0 commit comments

Comments
 (0)