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

New algorithm to sort pending transactions taking into account price #651

Merged
merged 1 commit into from Sep 24, 2018

Conversation

Projects
None yet
6 participants
@ignaciopulicedonatto
Contributor

ignaciopulicedonatto commented Sep 20, 2018

  • New algorithm to sort transactions by price, but taking into account sender and then each cluster is order by nonce.
    This method first sorts list of getPendingTransactions into individual sender and sorts those lists by nonce. After the nonce ordering is satisfied, the results are merged back together by price in a heap to make it fast.

  • Also added some test to check the correct behaviour of the new ordering.

@ignaciopulicedonatto

This comment has been minimized.

Contributor

ignaciopulicedonatto commented Sep 24, 2018

This branch is ready to merge

@tinchou tinchou force-pushed the new-order-transactions branch from 8e00474 to 8065c93 Sep 24, 2018

New algorithm to sort pending transactions taking into account price
This algorithm sort all transactions by price keeping the previous ordering by nonce.
@tinchou

still looking good after rebase

@rskops

This comment has been minimized.

rskops commented Sep 24, 2018

SonarQube analysis reported 1 issue

  1. MAJOR PendingState.java#L127: Method co.rsk.core.bc.PendingState.sortByPriceTakingIntoAccountSenderAndNonce(List) does not presize the allocation of a collection rule

@diega diega merged commit 98fb15f into master Sep 24, 2018

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
default Build finished.
Details
sonarqube SonarQube reported 1 issue, no criticals or blockers

@diega diega deleted the new-order-transactions branch Sep 24, 2018

@aeidelman aeidelman added this to the Orchid v0.5.1 milestone Oct 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment