mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
chore!: Populate the headers field in the ExecutionWitness when calling debug_executionWitness (#15608)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@@ -19,6 +19,14 @@ pub struct ExecutionWitnessRecord {
|
||||
///
|
||||
/// `keccak(address|slot) => address|slot`
|
||||
pub keys: Vec<Bytes>,
|
||||
/// The lowest block number referenced by any BLOCKHASH opcode call during transaction
|
||||
/// execution.
|
||||
///
|
||||
/// This helps determine which ancestor block headers must be included in the
|
||||
/// `ExecutionWitness`.
|
||||
///
|
||||
/// `None` - when the BLOCKHASH opcode was not called during execution
|
||||
pub lowest_block_number: Option<u64>,
|
||||
}
|
||||
|
||||
impl ExecutionWitnessRecord {
|
||||
@@ -62,6 +70,8 @@ impl ExecutionWitnessRecord {
|
||||
}
|
||||
}
|
||||
}
|
||||
// BTreeMap keys are ordered, so the first key is the smallest
|
||||
self.lowest_block_number = statedb.block_hashes.keys().next().copied()
|
||||
}
|
||||
|
||||
/// Creates the record from the state after execution.
|
||||
|
||||
Reference in New Issue
Block a user