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

Implemented a rule to accept a tx replacement on Transaction Pool #662

Merged
merged 2 commits into from Oct 19, 2018

Conversation

Projects
None yet
3 participants
@lsebrie
Contributor

lsebrie commented Oct 11, 2018

When a new transaction arrives from a sender that wants to replace another transaction not yet processed there is introduced a new rule to determine if it's paying enough gas to accept the new one.

@lsebrie lsebrie force-pushed the tx_replace_by_nonce branch 2 times, most recently from 4e7fb39 to c609a25 Oct 12, 2018

@diega

Great feature!

}
return nextNonce;
return maxNonce.isPresent() && maxNonce.get().compareTo(nextNonce) >= 0 ? maxNonce.get() : nextNonce;

This comment has been minimized.

@diega

diega Oct 12, 2018

Contributor

I think it may be more readable if you move the .add(BigInteger.ONE) here b/c you let the maxNonce variable to contain exactly that and if that value exists, then you return the next one

@lsebrie lsebrie force-pushed the tx_replace_by_nonce branch 2 times, most recently from bab91f1 to ce7c11a Oct 12, 2018

@lsebrie lsebrie force-pushed the tx_replace_by_nonce branch from ce7c11a to f429972 Oct 19, 2018

@diega

diega approved these changes Oct 19, 2018

@aeidelman aeidelman merged commit 918e146 into master Oct 19, 2018

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
default Build finished.
Details
sonarqube SonarQube reported no issues

@aeidelman aeidelman deleted the tx_replace_by_nonce branch Oct 19, 2018

@aeidelman aeidelman added this to the Orchid v0.5.3 milestone Oct 26, 2018

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