From 35f1c994bfb2a4fd03ae8c80681f26afd58ddafd Mon Sep 17 00:00:00 2001 From: Brechtpd Date: Tue, 25 Jun 2024 07:36:33 +0200 Subject: [PATCH] small refactor --- core/src/preflight.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/src/preflight.rs b/core/src/preflight.rs index cd0a5abc..eb00c2d2 100644 --- a/core/src/preflight.rs +++ b/core/src/preflight.rs @@ -587,7 +587,7 @@ fn get_transactions_from_block(block: &Block) -> RaikoResult> { match &block.transactions { BlockTransactions::Full(txs) => { for tx in txs { - transactions.push(from_block_tx(tx)?); + transactions.push(TxEnvelope::try_from(tx.clone()).unwrap()); } }, _ => unreachable!("Block is too old, please connect to an archive node or use a block that is at most 128 blocks old."), @@ -600,10 +600,6 @@ fn get_transactions_from_block(block: &Block) -> RaikoResult> { Ok(transactions) } -fn from_block_tx(tx: &AlloyRpcTransaction) -> RaikoResult { - Ok(TxEnvelope::try_from(tx.clone()).unwrap()) -} - #[cfg(test)] mod test { use ethers_core::types::Transaction;