mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-30 01:28:21 -05:00
fix: use ecrevored transaction for tracing (#6327)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user