mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 02:49:55 +00:00
chore: cargo fmt
This commit is contained in:
@ -82,9 +82,10 @@ where
|
||||
let mut tx_env = self.create_txn_env(&evm_env, request, &mut db)?;
|
||||
|
||||
let mut is_basic_transfer = false;
|
||||
if tx_env.input().is_empty()
|
||||
&& let TxKind::Call(to) = tx_env.kind()
|
||||
&& let Ok(code) = db.db.account_code(&to) {
|
||||
if tx_env.input().is_empty() &&
|
||||
let TxKind::Call(to) = tx_env.kind() &&
|
||||
let Ok(code) = db.db.account_code(&to)
|
||||
{
|
||||
is_basic_transfer = code.map(|code| code.is_empty()).unwrap_or(true);
|
||||
}
|
||||
|
||||
@ -105,8 +106,9 @@ where
|
||||
let mut min_tx_env = tx_env.clone();
|
||||
min_tx_env.set_gas_limit(MIN_TRANSACTION_GAS);
|
||||
|
||||
if let Ok(res) = evm.transact(min_tx_env).map_err(Self::Error::from_evm_err)
|
||||
&& res.result.is_success() {
|
||||
if let Ok(res) = evm.transact(min_tx_env).map_err(Self::Error::from_evm_err) &&
|
||||
res.result.is_success()
|
||||
{
|
||||
return Ok(U256::from(MIN_TRANSACTION_GAS));
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,8 +81,9 @@ impl BlockPoller {
|
||||
.await
|
||||
.ok_or(eyre::eyre!("Failed to find latest block number"))?;
|
||||
|
||||
if let Some(debug_cutoff_height) = debug_cutoff_height
|
||||
&& next_block_number > debug_cutoff_height {
|
||||
if let Some(debug_cutoff_height) = debug_cutoff_height &&
|
||||
next_block_number > debug_cutoff_height
|
||||
{
|
||||
next_block_number = debug_cutoff_height;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user