Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core-transaction-pool): sort by fee, nonce #2937

Merged
merged 2 commits into from
Sep 18, 2019
Merged

fix(core-transaction-pool): sort by fee, nonce #2937

merged 2 commits into from
Sep 18, 2019

Conversation

vasild
Copy link
Contributor

@vasild vasild commented Sep 18, 2019

The merge 3923c37 wrongly removed the method sortAll() from memory.ts.
This method was sorting transactions in the pool by fee, nonce (sorted
by highest fee first, but transactions from the same sender must be
sorted lowest nonce first).

Restore the sortAll() method as of before the merge and adapt it to use
the calculateTransactionExpiration() method for expiration sorting.

A summary of what changes this PR introduces and why they were made.

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactor
  • Performance
  • Tests
  • Build
  • Documentation
  • Code style update
  • Continuous Integration
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Does this PR release a new version?

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the develop branch, not the master branch
  • All tests are passing
  • New/updated tests are included

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

The merge 3923c37 wrongly removed the method sortAll() from memory.ts.
This method was sorting transactions in the pool by fee, nonce (sorted
by highest fee first, but transactions from the same sender must be
sorted lowest nonce first).

Restore the sortAll() method as of before the merge and adapt it to use
the calculateTransactionExpiration() method for expiration sorting.
@spkjp spkjp merged commit 2981176 into develop Sep 18, 2019
@ghost ghost deleted the fix-pool-sort branch September 18, 2019 21:35
spkjp pushed a commit that referenced this pull request Sep 19, 2019
The merge 3923c37 wrongly removed the method sortAll() from memory.ts.
This method was sorting transactions in the pool by fee, nonce (sorted
by highest fee first, but transactions from the same sender must be
sorted lowest nonce first).

Restore the sortAll() method as of before the merge and adapt it to use
the calculateTransactionExpiration() method for expiration sorting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants