We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a31d9be commit f240a34Copy full SHA for f240a34
crates/anvil/src/eth/backend/mem/mod.rs
@@ -3116,7 +3116,7 @@ impl TransactionValidator for Backend {
3116
}
3117
_ => {
3118
// check sufficient funds: `gas * price + value`
3119
- let req_funds = max_cost.checked_add(value.to()).ok_or_else(|| {
+ let req_funds = max_cost.checked_add(value.saturating_to()).ok_or_else(|| {
3120
warn!(target: "backend", "[{:?}] cost too high", tx.hash());
3121
InvalidTransactionError::InsufficientFunds
3122
})?;
0 commit comments