mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
perf(tx-pool): avoid copying tx cost (#12629)
This commit is contained in:
@ -384,11 +384,12 @@ where
|
||||
let cost = transaction.cost();
|
||||
|
||||
// Checks for max cost
|
||||
if cost > account.balance {
|
||||
if cost > &account.balance {
|
||||
let expected = *cost;
|
||||
return TransactionValidationOutcome::Invalid(
|
||||
transaction,
|
||||
InvalidTransactionError::InsufficientFunds(
|
||||
GotExpected { got: account.balance, expected: cost }.into(),
|
||||
GotExpected { got: account.balance, expected }.into(),
|
||||
)
|
||||
.into(),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user