Skip to content

Commit ca0c551

Browse files
committed
dont throw hard error just warn for now
1 parent 5413aef commit ca0c551

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

crates/ingress-rpc/src/validation.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use op_alloy_network::Optimism;
99
use op_revm::{OpSpecId, l1block::L1BlockInfo};
1010
use reth_optimism_evm::extract_l1_info_from_tx;
1111
use reth_rpc_eth_types::{EthApiError, RpcInvalidTransactionError};
12+
use tracing::warn;
1213

1314
/// Account info for a given address
1415
pub struct AccountInfo {
@@ -63,7 +64,9 @@ impl L1BlockInfoLookup for RootProvider<Optimism> {
6364
return Ok(l1_block_info);
6465
}
6566
}
66-
Err(anyhow::anyhow!("Failed to fetch L1 block info"))
67+
// TODO: we should return an error here when we have a proper mempool node
68+
warn!("Failed to fetch L1 block info");
69+
Ok(L1BlockInfo::default())
6770
}
6871
}
6972

@@ -218,7 +221,7 @@ mod tests {
218221
gas_limit: 21000,
219222
max_fee_per_gas: 20000000000u128,
220223
max_priority_fee_per_gas: 1000000000u128,
221-
to: Address::random().into(),
224+
to: Address::random(),
222225
value: U256::from(10000000000000u128),
223226
authorization_list: Default::default(),
224227
access_list: Default::default(),
@@ -284,7 +287,7 @@ mod tests {
284287
gas_limit: 21000,
285288
max_fee_per_gas: 20000000000u128,
286289
max_priority_fee_per_gas: 1000000000u128,
287-
to: Address::random().into(),
290+
to: Address::random(),
288291
value: U256::from(10000000000000u128),
289292
access_list: Default::default(),
290293
input: bytes!("").clone(),

0 commit comments

Comments
 (0)