test: Delete generate* calls from TestNode #23207

pull MarcoFalke wants to merge 3 commits into bitcoin:master from MarcoFalke:2110-testDelGen changing 7 files +28 −16
  1. MarcoFalke commented at 11:48 am on October 6, 2021: member

    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 eb02dbba3cd9f7294cd81e268cf85a1de7a71d02 from today or the first commit in this pull request.

  2. test: Use generate* from TestFramework, not TestNode faac1cda6e
  3. test: Use generate* node RPC, not wallet RPC fac7f6102f
  4. test: Delete generate* calls from TestNode fac62e6ff5
  5. DrahtBot added the label Tests on Oct 6, 2021
  6. stratospher commented at 3:34 am on October 9, 2021: contributor

    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
  7. brunoerg approved
  8. brunoerg commented at 12:33 pm on October 14, 2021: member

    tACK fac62e6ff594f03832f5c0057f9b67c9118c21f4

  9. in test/functional/test_framework/test_framework.py:635 in fac62e6ff5
    632+        blocks = generator.generate(*args, invalid_call=False, **kwargs)
    633         return blocks
    634 
    635     def generateblock(self, generator, *args, **kwargs):
    636-        blocks = generator.generateblock(*args, **kwargs)
    637+        blocks = generator.generateblock(*args, invalid_call=False, **kwargs)
    


    promag commented at 9:47 pm on October 15, 2021:

    fac62e6ff594f03832f5c0057f9b67c9118c21f4

    Have you considered

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

    and just assert false or something below?


    MarcoFalke commented at 11:10 am on October 18, 2021:
    Would this work with generate as well?
  10. promag commented at 9:47 pm on October 15, 2021: member
    Code review ACK fac62e6ff594f03832f5c0057f9b67c9118c21f4.
  11. MarcoFalke merged this on Oct 18, 2021
  12. MarcoFalke closed this on Oct 18, 2021

  13. MarcoFalke deleted the branch on Oct 18, 2021
  14. sidhujag referenced this in commit 0037d0a390 on Oct 18, 2021
  15. MarcoFalke referenced this in commit 077e98c6c2 on Oct 19, 2021
  16. sidhujag referenced this in commit c3dcd95e0e on Oct 19, 2021
  17. domob1812 referenced this in commit 441f4315ba on Oct 29, 2021
  18. domob1812 referenced this in commit f4f450b2b0 on Oct 29, 2021
  19. domob1812 referenced this in commit 88ded291f3 on Oct 29, 2021
  20. Sjors commented at 4:07 pm on June 17, 2022: member

    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.

  21. laanwj commented at 4:29 pm on June 17, 2022: member

    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

  22. Fabcien referenced this in commit b5c2658072 on Nov 17, 2022
  23. delta1 referenced this in commit 4b2717378b on May 11, 2023
  24. jamesdorfman referenced this in commit c247c6c357 on May 12, 2023
  25. delta1 referenced this in commit e110175149 on May 12, 2023
  26. delta1 referenced this in commit f80332fee5 on May 12, 2023
  27. DrahtBot locked this on Jun 17, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 18:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me