mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 09:16:00 +00:00
use cached head and drop fork choice read lock earlier
This commit is contained in:
@@ -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()
|
.finalized_checkpoint()
|
||||||
.epoch
|
.epoch
|
||||||
.start_slot(T::EthSpec::slots_per_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`
|
// TODO(EIP-7732): check that we haven't seen another valid `SignedExecutionPayloadEnvelope`
|
||||||
// for this block root from this builder - envelope status table check
|
// for this block root from this builder - envelope status table check
|
||||||
let block = match ctx.store.try_get_full_block(&beacon_block_root)? {
|
let block = match ctx.store.try_get_full_block(&beacon_block_root)? {
|
||||||
|
|||||||
Reference in New Issue
Block a user