fix: use ecrevored transaction for tracing (#6327)

This commit is contained in:
Matthias Seitz
2024-02-01 18:12:02 +01:00
committed by GitHub
parent 7f2167f1bd
commit 1104ea7b4d
2 changed files with 5 additions and 5 deletions

View File

@@ -213,7 +213,7 @@ where
// block the transaction is included in
let state_at: BlockId = block.parent_hash.into();
let block_hash = block.hash;
let block_txs = block.body;
let block_txs = block.into_transactions_ecrecovered();
let this = self.clone();
self.inner

View File

@@ -249,7 +249,7 @@ pub trait EthTransactions: Send + Sync {
async fn transaction_and_block(
&self,
hash: B256,
) -> EthResult<Option<(TransactionSource, SealedBlock)>>;
) -> EthResult<Option<(TransactionSource, SealedBlockWithSenders)>>;
/// Retrieves the transaction if it exists and returns its trace.
///
@@ -727,7 +727,7 @@ where
async fn transaction_and_block(
&self,
hash: B256,
) -> EthResult<Option<(TransactionSource, SealedBlock)>> {
) -> EthResult<Option<(TransactionSource, SealedBlockWithSenders)>> {
let (transaction, at) = match self.transaction_by_hash_at(hash).await? {
None => return Ok(None),
Some(res) => res,
@@ -738,7 +738,7 @@ where
BlockId::Hash(hash) => hash.block_hash,
_ => return Ok(None),
};
let block = self.cache().get_block(block_hash).await?;
let block = self.cache().get_block_with_senders(block_hash).await?;
Ok(block.map(|block| (transaction, block.seal(block_hash))))
}
@@ -765,7 +765,7 @@ where
// we need to get the state of the parent block because we're essentially replaying the
// block the transaction is included in
let parent_block = block.parent_hash;
let block_txs = block.body;
let block_txs = block.into_transactions_ecrecovered();
self.spawn_with_state_at_block(parent_block.into(), move |state| {
let mut db = CacheDB::new(StateProviderDatabase::new(state));