mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: use cost in error (#2213)
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
This commit is contained in:
@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user