mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 21:04:41 +00:00
Don't create a execution payload with same timestamp as terminal block (#3331)
## Issue Addressed Resolves #3316 ## Proposed Changes This PR fixes an issue where lighthouse created a transition block with `block.execution_payload().timestamp == terminal_block.timestamp` if the terminal block was created at the slot boundary.
This commit is contained in:
@@ -3908,14 +3908,13 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
ForkName::Base | ForkName::Altair => return Ok(()),
|
||||
_ => {
|
||||
// We are post-bellatrix
|
||||
if execution_layer
|
||||
if let Some(payload_attributes) = execution_layer
|
||||
.payload_attributes(next_slot, params.head_root)
|
||||
.await
|
||||
.is_some()
|
||||
{
|
||||
// We are a proposer, check for terminal_pow_block_hash
|
||||
if let Some(terminal_pow_block_hash) = execution_layer
|
||||
.get_terminal_pow_block_hash(&self.spec)
|
||||
.get_terminal_pow_block_hash(&self.spec, payload_attributes.timestamp)
|
||||
.await
|
||||
.map_err(Error::ForkchoiceUpdate)?
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user