Skip to content

Commit e74bf0e

Browse files
authored
chore: use is_zero directly (#8297)
1 parent e302101 commit e74bf0e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/anvil/src/eth/backend/mem/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ impl Backend {
11711171
optimism: OptimismFields { enveloped_tx: Some(Bytes::new()), ..Default::default() },
11721172
};
11731173

1174-
if env.block.basefee == revm::primitives::U256::ZERO {
1174+
if env.block.basefee.is_zero() {
11751175
// this is an edge case because the evm fails if `tx.effective_gas_price < base_fee`
11761176
// 0 is only possible if it's manually set
11771177
env.cfg.disable_base_fee = true;

crates/anvil/src/eth/otterscan/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ impl OtsInternalOperation {
297297
.filter_map(|node| {
298298
let r#type = match node.trace.kind {
299299
_ if node.is_selfdestruct() => OtsInternalOperationType::SelfDestruct,
300-
CallKind::Call if node.trace.value != U256::ZERO => {
300+
CallKind::Call if !node.trace.value.is_zero() => {
301301
OtsInternalOperationType::Transfer
302302
}
303303
CallKind::Create => OtsInternalOperationType::Create,

0 commit comments

Comments
 (0)