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
refactors for subpackage evaluation #28758
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
f60560b
to
6432d24
Compare
6432d24
to
80cd897
Compare
This allows IsSorted() and IsConsistent() to be used by themselves. IsSorted() with a precomputed set is used so that we don't create this set multiple times.
-BEGIN VERIFY SCRIPT- sed -i 's/CheckPackage(/IsWellFormedPackage(/g' $(git grep -l CheckPackage) -END VERIFY SCRIPT-
…, signal BIP125 Support the creation of a transaction with multiple specified inputs or outputs. Also accept a target feerate and return the fee paid. Also, signal BIP125 by default - a subsequent commit needs to RBF something. Co-authored-by: Andrew Chow <achow101@gmail.com>
Avoid duplicate code. This will be used at the end of every AcceptSubPackage and after PreChecks loop in AcceptPackage.
80cd897
to
b5a60ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started going down the path of making Package a class and these member functions, but it touched hundreds of loc and made it really awkward to try to use it within AncestorPackage when we're checking if subsets are sorted
// This function checks consistency based on inputs, and we can't do that if there are | ||
// no inputs. Duplicate empty transactions are also not consistent with one another. | ||
// This doesn't create false negatives, as unconfirmed transactions are not allowed to | ||
// have no inputs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“as unconfirmed transactions are not allowed to have no inputs at consensus validation (see CheckTransaction)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK b5a60ab
This is part of #27463. It splits off the more trivial changes from #26711 for ease of review, as requested in #26711 (comment).
CheckPackage
toIsPackageWellFormed
CreateValidTransaction
unit test utility to:CleanupTemporaryCoins
into its own function to be reused later without duplication