chore: use from conversion for txkind (#16990)

This commit is contained in:
Matthias Seitz
2025-06-22 12:49:22 +02:00
committed by GitHub
parent a0c3bbf920
commit 09f740d930
2 changed files with 2 additions and 5 deletions

View File

@@ -190,7 +190,7 @@ pub trait EthCall: EstimateCall + Call + LoadPendingBlock + LoadBlock + FullEthA
let block = simulate::build_simulated_block(
result.block,
results,
return_full_transactions,
return_full_transactions.into(),
this.tx_resp_builder(),
)?;

View File

@@ -189,7 +189,7 @@ where
pub fn build_simulated_block<T, B, Halt: Clone>(
block: RecoveredBlock<B>,
results: Vec<ExecutionResult<Halt>>,
full_transactions: bool,
txs_kind: BlockTransactionsKind,
tx_resp_builder: &T,
) -> Result<SimulatedBlock<Block<RpcTransaction<T::Network>, Header<B::Header>>>, T::Error>
where
@@ -256,9 +256,6 @@ where
calls.push(call);
}
let txs_kind =
if full_transactions { BlockTransactionsKind::Full } else { BlockTransactionsKind::Hashes };
let block = block.into_rpc_block(txs_kind, |tx, tx_info| tx_resp_builder.fill(tx, tx_info))?;
Ok(SimulatedBlock { inner: block, calls })
}