mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor: use is_none_or instead of map_or (#13035)
This commit is contained in:
@ -461,7 +461,7 @@ impl FinalizedBlockTracker {
|
||||
let finalized = finalized_block?;
|
||||
self.last_finalized_block
|
||||
.replace(finalized)
|
||||
.map_or(true, |last| last < finalized)
|
||||
.is_none_or(|last| last < finalized)
|
||||
.then_some(finalized)
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ impl<T: TransactionOrdering> Iterator for BestTransactionsWithFees<T> {
|
||||
if best.transaction.max_fee_per_gas() >= self.base_fee as u128 &&
|
||||
best.transaction
|
||||
.max_fee_per_blob_gas()
|
||||
.map_or(true, |fee| fee >= self.base_fee_per_blob_gas as u128)
|
||||
.is_none_or(|fee| fee >= self.base_fee_per_blob_gas as u128)
|
||||
{
|
||||
return Some(best);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user