use cached head and drop fork choice read lock earlier

This commit is contained in:
Eitan Seri- Levi
2026-02-24 10:59:03 -08:00
parent 6e89ba63be
commit 147f2e22e0

View File

@@ -118,13 +118,15 @@ impl<T: BeaconChainTypes> GossipVerifiedEnvelope<T> {
});
};
let latest_finalized_slot = fork_choice_read_lock
drop(fork_choice_read_lock);
let latest_finalized_slot = ctx
.canonical_head
.cached_head()
.finalized_checkpoint()
.epoch
.start_slot(T::EthSpec::slots_per_epoch());
drop(fork_choice_read_lock);
// TODO(EIP-7732): check that we haven't seen another valid `SignedExecutionPayloadEnvelope`
// for this block root from this builder - envelope status table check
let block = match ctx.store.try_get_full_block(&beacon_block_root)? {