Skip to content

Commit 9e62675

Browse files
committed
hotfix: point-in-time latest going to mined-past
1 parent 10d8c81 commit 9e62675

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/eth/executor/evm_input.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl EvmInput {
120120
}
121121

122122
/// Creates from a call that was sent directly to Stratus with `eth_call` or `eth_estimateGas` for a mined block.
123-
pub fn from_mined_block(input: CallInput, block: Block) -> Self {
123+
pub fn from_mined_block(input: CallInput, block: Block, point_in_time: PointInTime) -> Self {
124124
Self {
125125
from: input.from.unwrap_or(Address::ZERO),
126126
to: input.to.map_into(),
@@ -131,7 +131,7 @@ impl EvmInput {
131131
nonce: None,
132132
block_number: block.number(),
133133
block_timestamp: block.header.timestamp,
134-
point_in_time: PointInTime::MinedPast(block.number()),
134+
point_in_time,
135135
chain_id: None,
136136
}
137137
}

src/eth/executor/executor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ impl Executor {
627627
let Some(block) = self.storage.read_block(point_in_time.into())? else {
628628
return Err(RpcError::BlockFilterInvalid { filter: point_in_time.into() }.into());
629629
};
630-
EvmInput::from_mined_block(call_input.clone(), block)
630+
EvmInput::from_mined_block(call_input.clone(), block, point_in_time)
631631
}
632632
};
633633

0 commit comments

Comments
 (0)