-
Notifications
You must be signed in to change notification settings - Fork 37.7k
test: Delete generate* calls from TestNode #23207
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
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.
Tested ACK fac62e6.
Verified that the tests run successfully after:
- using
generate()
from TestFramework in mempool_package_limits.py - using
generatetoaddress()
from TestFramework in wallet_transactiontime_rescan.py, wallet_descriptor.py and wallet_importdescriptors.py
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.
Code review ACK fac62e6.
return blocks | ||
|
||
def generateblock(self, generator, *args, **kwargs): | ||
blocks = generator.generateblock(*args, **kwargs) | ||
blocks = generator.generateblock(*args, invalid_call=False, **kwargs) |
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.
Have you considered
return generator..__getattr__('generateblock')(*args, **kwargs)
and just assert false
or something below?
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.
Would this work with generate
as well?
fac62e6 test: Delete generate* calls from TestNode (MarcoFalke) fac7f61 test: Use generate* node RPC, not wallet RPC (MarcoFalke) faac1cd test: Use generate* from TestFramework, not TestNode (MarcoFalke) Pull request description: Deleting the methods is needed for bitcoin#22567 to pave the way to make it easier to implicitly call the `sync_all` member function. Without the methods being deleted, nothing prevents developers from adding calls to it. As history showed, developers *will* add calls to it. For example, see commit eb02dbb from today or the first commit in this pull request. ACKs for top commit: stratospher: Tested ACK fac62e6. brunoerg: tACK fac62e6 promag: Code review ACK fac62e6. Tree-SHA512: 6d4dea8f95ead954acfef2e6a5d98897ce0c2d02265c5b137bb149d0265543bd51d7e8403e1945b9af75df5524ca50064fe1d2a432b25c8abc71bbb28ed6ed53
…t.py ffdd94d test: Fix wallet_multisig_descriptor_psbt.py (Hennadii Stepanov) Pull request description: The `wallet_multisig_descriptor_psbt.py`, which was introduced in the recent bitcoin/bitcoin#22067, has a merge conflict with the previously merged bitcoin/bitcoin#23207. Fixed in this PR. ACKs for top commit: mjdietzx: Tested ACK ffdd94d S3RK: ACK ffdd94d Tree-SHA512: e8871aeebbe119e22347de19f62b4524e191885d66f94af802a33793dfa413790901fd54aeea1ab3d1b1487cb457e8a58b0aef19d0dc78b12a583646ba4af67e
ffdd94d test: Fix wallet_multisig_descriptor_psbt.py (Hennadii Stepanov) Pull request description: The `wallet_multisig_descriptor_psbt.py`, which was introduced in the recent bitcoin#22067, has a merge conflict with the previously merged bitcoin#23207. Fixed in this PR. ACKs for top commit: mjdietzx: Tested ACK ffdd94d S3RK: ACK ffdd94d Tree-SHA512: e8871aeebbe119e22347de19f62b4524e191885d66f94af802a33793dfa413790901fd54aeea1ab3d1b1487cb457e8a58b0aef19d0dc78b12a583646ba4af67e
Updated tests for bitcoin/bitcoin#23207. This removed the test node's "generate" method completely, and requires us to always call "generate" through the test framework instance instead.
Updated tests for bitcoin/bitcoin#23207. This removed the test node's "generate" method completely, and requires us to always call "generate" through the test framework instance instead.
Updated tests for bitcoin/bitcoin#23207. This removed the test node's "generate" method completely, and requires us to always call "generate" through the test framework instance instead.
Indeed, I was using this in the ForkMonitor test suite. A slightly more descriptive comment "Call generatetoaddress on the test framework, not on individual nodes" might be handy. |
Agree. feel free to make a PR |
Summary: ``` Deleting the methods is needed for #22567 to pave the way to make it easier to implicitly call the sync_all member function. ``` Backport of [[bitcoin/bitcoin#23207 | core#23207]]. Includes a conversion leftover to interface_zmq, but not the other test changes that don't apply to us. Test Plan: ninja check-functional-extended Reviewers: #bitcoin_abc, PiRK Reviewed By: #bitcoin_abc, PiRK Differential Revision: https://reviews.bitcoinabc.org/D12521
Deleting the methods is needed for #22567 to pave the way to make it easier to implicitly call the
sync_all
member function.Without the methods being deleted, nothing prevents developers from adding calls to it. As history showed, developers will add calls to it. For example, see commit eb02dbb from today or the first commit in this pull request.