mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
perf: use ExecutionResult::into_logs (#2184)
This commit is contained in:
@ -11,7 +11,7 @@ description = "revm inspector implementations used by reth"
|
||||
reth-primitives = { path = "../../primitives" }
|
||||
reth-rpc-types = { path = "../../rpc/rpc-types" }
|
||||
|
||||
revm = { version = "3.1.0" }
|
||||
revm = { version = "3" }
|
||||
# remove from reth and reexport from revm
|
||||
hashbrown = "0.13"
|
||||
|
||||
|
||||
@ -10,4 +10,4 @@ description = "core reth specific revm utilities"
|
||||
# reth
|
||||
reth-primitives = { path = "../../primitives" }
|
||||
|
||||
revm = { version = "3.1.0" }
|
||||
revm = { version = "3" }
|
||||
|
||||
@ -9,7 +9,7 @@ use reth_consensus_common::calc;
|
||||
use reth_executor::post_state::PostState;
|
||||
use reth_interfaces::executor::Error;
|
||||
use reth_primitives::{
|
||||
Account, Address, Block, Bloom, Bytecode, ChainSpec, Hardfork, Header, Log, Receipt,
|
||||
Account, Address, Block, Bloom, Bytecode, ChainSpec, Hardfork, Header, Receipt,
|
||||
ReceiptWithBloom, TransactionSigned, Withdrawal, H256, U256,
|
||||
};
|
||||
use reth_provider::{BlockExecutor, StateProvider};
|
||||
@ -241,9 +241,6 @@ where
|
||||
// append gas used
|
||||
cumulative_gas_used += result.gas_used();
|
||||
|
||||
// cast revm logs to reth logs
|
||||
let logs: Vec<Log> = result.logs().into_iter().map(into_reth_log).collect();
|
||||
|
||||
// Push transaction changeset and calculate header bloom filter for receipt.
|
||||
post_state.add_receipt(Receipt {
|
||||
tx_type: transaction.tx_type(),
|
||||
@ -251,7 +248,8 @@ where
|
||||
// receipts`.
|
||||
success: result.is_success(),
|
||||
cumulative_gas_used,
|
||||
logs,
|
||||
// convert to reth log
|
||||
logs: result.into_logs().into_iter().map(into_reth_log).collect(),
|
||||
});
|
||||
post_state.finish_transition();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user