mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: convert hash field to OnceLock<TxHash> on TransactionSigned (#12596)
Co-authored-by: joshieDo <93316087+joshieDo@users.noreply.github.com>
This commit is contained in:
@ -628,7 +628,7 @@ pub trait Call: LoadState<Evm: ConfigureEvm<Header = Header>> + SpawnBlocking {
|
||||
cfg.clone(),
|
||||
block_env.clone(),
|
||||
block_txs,
|
||||
tx.hash,
|
||||
tx.hash(),
|
||||
)?;
|
||||
|
||||
let env = EnvWithHandlerCfg::new_with_cfg_env(
|
||||
|
||||
@ -204,7 +204,7 @@ pub trait Trace: LoadState<Evm: ConfigureEvm<Header = Header>> {
|
||||
cfg.clone(),
|
||||
block_env.clone(),
|
||||
block_txs,
|
||||
tx.hash,
|
||||
tx.hash(),
|
||||
)?;
|
||||
|
||||
let env = EnvWithHandlerCfg::new_with_cfg_env(
|
||||
|
||||
@ -107,7 +107,7 @@ where
|
||||
let mut transactions = block.transactions_with_sender().enumerate().peekable();
|
||||
let mut inspector = None;
|
||||
while let Some((index, (signer, tx))) = transactions.next() {
|
||||
let tx_hash = tx.hash;
|
||||
let tx_hash = tx.hash();
|
||||
|
||||
let env = EnvWithHandlerCfg {
|
||||
env: Env::boxed(
|
||||
@ -255,7 +255,7 @@ where
|
||||
cfg.clone(),
|
||||
block_env.clone(),
|
||||
block_txs,
|
||||
tx.hash,
|
||||
tx.hash(),
|
||||
)?;
|
||||
|
||||
let env = EnvWithHandlerCfg {
|
||||
@ -274,7 +274,7 @@ where
|
||||
Some(TransactionContext {
|
||||
block_hash: Some(block_hash),
|
||||
tx_index: Some(index),
|
||||
tx_hash: Some(tx.hash),
|
||||
tx_hash: Some(tx.hash()),
|
||||
}),
|
||||
&mut None,
|
||||
)
|
||||
|
||||
@ -42,7 +42,7 @@ where
|
||||
.enumerate()
|
||||
.map(|(idx, (tx, receipt))| {
|
||||
let meta = TransactionMeta {
|
||||
tx_hash: tx.hash,
|
||||
tx_hash: tx.hash(),
|
||||
index: idx as u64,
|
||||
block_hash,
|
||||
block_number,
|
||||
|
||||
@ -41,7 +41,8 @@ where
|
||||
tx_info: TransactionInfo,
|
||||
) -> Result<Self::Transaction, Self::Error> {
|
||||
let from = tx.signer();
|
||||
let TransactionSigned { transaction, signature, hash } = tx.into_signed();
|
||||
let hash = tx.hash();
|
||||
let TransactionSigned { transaction, signature, .. } = tx.into_signed();
|
||||
|
||||
let inner: TxEnvelope = match transaction {
|
||||
reth_primitives::Transaction::Legacy(tx) => {
|
||||
|
||||
Reference in New Issue
Block a user