-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve non-native currency fee tx handling (#2)
Improves multi-currency fee support in the tx pool queue and pending lists. Previously when paying for a tx in a non-native currency, the balance of the account would only be checked when inserting the transaction into the tx pool, but as the balance of the account can change after the tx is admitted, transactions are periodically checked for validity in `txList.Filter`. This PR changes txList to properly track balances in non-native currencies. This also adds support for checking the gas price minimum in the txList. This PR also converts gas prices to CELO prior to comparing if a new transaction at the same nonce should override an old transaction at the same nonce. It also refactors calculations of `tx.Fee()`
- Loading branch information
Joshua Gutow
authored and
Joshua Gutow
committed
Feb 5, 2021
1 parent
e14be02
commit 3a2a2fc
Showing
3 changed files
with
194 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters