mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-24 07:14:46 +00:00
Kintsugi on_merge_block tests (#2811)
* Start v1.1.5 updates * Implement new payload creation logic * Tidy, add comments * Remove unused error enums * Add validate payload for gossip * Refactor validate_merge_block * Split payload verification in per block processing * Add execute_payload * Tidy * Tidy * Start working on new fork choice tests * Fix failing merge block test * Skip block_lookup_failed test * Fix failing terminal block test * Fixes from self-review * Address review comments
This commit is contained in:
@@ -234,6 +234,17 @@ impl<'a, T: EthSpec> BeaconBlockRef<'a, T> {
|
||||
..self.block_header()
|
||||
}
|
||||
}
|
||||
|
||||
/// Extracts a reference to an execution payload from a block, returning an error if the block
|
||||
/// is pre-merge.
|
||||
pub fn execution_payload(&self) -> Result<&ExecutionPayload<T>, InconsistentFork> {
|
||||
self.body()
|
||||
.execution_payload()
|
||||
.ok_or_else(|| InconsistentFork {
|
||||
fork_at_slot: ForkName::Merge,
|
||||
object_fork: self.body().fork_name(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T: EthSpec> BeaconBlockRefMut<'a, T> {
|
||||
|
||||
Reference in New Issue
Block a user