From 7fa032f9c957fcc30a1b8c60877a3328ea812a44 Mon Sep 17 00:00:00 2001 From: int88 <106391185+int88@users.noreply.github.com> Date: Wed, 12 Jul 2023 03:15:05 +0800 Subject: [PATCH] test: fix engine hive of `Invalid Transition Payload Sync` (#3710) --- crates/consensus/beacon/src/engine/mod.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/consensus/beacon/src/engine/mod.rs b/crates/consensus/beacon/src/engine/mod.rs index b69d3bfee7..ad13462207 100644 --- a/crates/consensus/beacon/src/engine/mod.rs +++ b/crates/consensus/beacon/src/engine/mod.rs @@ -887,8 +887,15 @@ where let block_hash = block.hash(); let block_num_hash = block.num_hash(); + let mut lowest_buffered_ancestor = self.lowest_buffered_ancestor_or(block.hash); + if lowest_buffered_ancestor == block.hash { + lowest_buffered_ancestor = block.parent_hash; + } + // now check the block itself - if let Some(status) = self.check_invalid_ancestor_with_head(block.parent_hash, block.hash) { + if let Some(status) = + self.check_invalid_ancestor_with_head(lowest_buffered_ancestor, block.hash) + { return Ok(status) }