Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Oct 6, 2021

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.

Copy link
Contributor

@stratospher stratospher left a 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

Copy link
Contributor

@brunoerg brunoerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK fac62e6

Screen Shot 2021-10-14 at 09 29 44

Screen Shot 2021-10-14 at 09 30 00

Copy link
Contributor

@promag promag left a 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)
Copy link
Contributor

@promag promag Oct 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fac62e6

Have you considered

return generator..__getattr__('generateblock')(*args, **kwargs)

and just assert false or something below?

Copy link
Member Author

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?

@maflcko maflcko merged commit 2e82af4 into bitcoin:master Oct 18, 2021
@maflcko maflcko deleted the 2110-testDelGen branch October 18, 2021 11:10
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Oct 18, 2021
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
maflcko pushed a commit to bitcoin-core/gui that referenced this pull request Oct 19, 2021
…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
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Oct 19, 2021
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
domob1812 added a commit to domob1812/namecoin-core that referenced this pull request Oct 29, 2021
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.
domob1812 added a commit to domob1812/namecoin-core that referenced this pull request Oct 29, 2021
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.
domob1812 added a commit to xaya/xaya that referenced this pull request Oct 29, 2021
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.
@Sjors
Copy link
Member

Sjors commented Jun 17, 2022

As history showed, developers will add calls to it

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.

@laanwj
Copy link
Member

laanwj commented Jun 17, 2022

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

Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Nov 17, 2022
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
delta1 added a commit to delta1/elements that referenced this pull request May 11, 2023
jamesdorfman pushed a commit to jamesdorfman/elements that referenced this pull request May 12, 2023
delta1 added a commit to delta1/elements that referenced this pull request May 12, 2023
delta1 added a commit to delta1/elements that referenced this pull request May 12, 2023
@bitcoin bitcoin locked and limited conversation to collaborators Jun 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants