chore: use cost in error (#2213)

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
This commit is contained in:
Matthias Seitz
2023-04-12 17:53:52 +02:00
committed by GitHub
parent 15ad63f8c2
commit 48dc9987a1
2 changed files with 4 additions and 4 deletions

View File

@ -257,11 +257,11 @@ where
// Checks for max cost
if transaction.cost() > account.balance {
let max_fee = transaction.max_fee_per_gas().unwrap_or_default();
let cost = transaction.cost();
return TransactionValidationOutcome::Invalid(
transaction,
InvalidTransactionError::InsufficientFunds {
max_fee,
cost,
available_funds: account.balance,
}
.into(),