-
Notifications
You must be signed in to change notification settings - Fork 37.8k
test: Add generate* calls to test framework #22741
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. 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. |
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.
My intention when creating TestNode
was that it would be a batteries included programmatic API to the node. It's used by the test framework, but can easily be reused for manual testing, stress testing, etc, since it has no dependencies on the framework. I've personally used it to control a mainnet node with a few tweaks.
This branch introduces a dependency from MiniWallet
on TestFramework
. I think that's a shame, since it'd be nice if MiniWallet
could be used independently from the test framework for things like manual testing, like TestNode
can.
I've made a slight modification to this branch here: https://github.com/jnewbery/bitcoin/tree/pr22741.1 which doesn't add that dependency. Let me know what you think.
@@ -445,10 +445,10 @@ def find_output(node, txid, amount, *, blockhash=None): | |||
|
|||
# Helper to create at least "count" utxos | |||
# Pass in a fee that is sufficient for relay and mining new transactions. | |||
def create_confirmed_utxos(fee, node, count): | |||
def create_confirmed_utxos(test_framework, fee, node, count): |
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.
It feels slightly strange passing the TestFramework
object into these functions in util.py
.
Hopefully longer term, create_confirmed_utxos()
will be replaced by a miniwallet function, and mine_large_block()
and generate_to_height()
can be moved to the single files that use those functions.
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.
generate_to_height
is removed, but the others remain for now
fa3bb4f
to
b932229
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.
Thanks @jnewbery. I've pushed your branch and left a nit comment.
b932229
to
fa855ae
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.
utACK fa855ae
The changes in feature_rbf can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
fa855ae
to
fab2e23
Compare
utACK fab2e23 |
Summary --- This is a backport of bitcoin/bitcoin@faf7e92 See bitcoin/bitcoin#22741 Test plan --- * `ninja all check-functional`
Summary --- This is a backport of bitcoin/bitcoin@fab2e23 See bitcoin/bitcoin#22741 Test plan --- * `ninja all check-functional-extended`
This is needed for #22567.
By making the calls to
generate*
member function of the test framework, it paves the way to make it easier to implicitly call thesync_all
member function.