[tests] Change invalidblockrequest to use BitcoinTestFramework #11772

pull jnewbery wants to merge 3 commits into bitcoin:master from jnewbery:refactor_invalidblockrequest changing 2 files +54 −69
  1. jnewbery commented at 4:38 pm on November 27, 2017: member

    Builds on #11771. Please review that PR first

    Next step in #10603.

    • first commit tidies up invalidblockrequest.py
    • second commit removes usage of ComparisonTestFramework
  2. fanquake added the label Tests on Nov 27, 2017
  3. jnewbery force-pushed on Nov 30, 2017
  4. jnewbery commented at 4:24 pm on December 2, 2017: member
    This requires rebase, but I’ll leave it as it is until #11771 is reviewed/merged.
  5. jnewbery force-pushed on Dec 14, 2017
  6. in test/functional/invalidblockrequest.py:56 in 62bb3a0892 outdated
    79-            self.block_time += 1
    80-            test.blocks_and_transactions.append([block, True])
    81-            height += 1
    82-        yield test
    83+        best_block = node.getblock(node.getbestblockhash())
    84+        tip = int("0x" + node.getbestblockhash(), 0)
    


    ryanofsky commented at 8:09 pm on December 20, 2017:

    In commit “Change invalidblockrequest to use BitcoinTestFramework”

    Maybe avoid 0x prefix here and above by calling int(hash, 16)

  7. ryanofsky commented at 8:16 pm on December 20, 2017: member

    Reviewed last two commits only. Other commits are part of #11771 (and out of date).

    • utACK 62bb3a0892558cf8813a22e1bf7860598dde3441 [tests] Change invalidblockrequest to use BitcoinTestFramework
    • utACK 1d26a167c73b3e94509b3d39fa5875fdb9601eb1 [tests] Fix flake8 warnings in invalidblockrequest
  8. jnewbery commented at 1:59 pm on February 13, 2018: member

    This requires rebase now that #11771 has been merged.

    Review comments from @conscott to address in this PR:

  9. [test] Fix nits leftover from 11771
    Remove unused variable reassignments in p2p_invalid_tx.py and call
    send_txs_and_test() with valid transaction.
    54b8c580b7
  10. [tests] Fix flake8 warnings in invalidblockrequest 2b7064eda7
  11. [tests] Change invalidblockrequest to use BitcoinTestFramework
    [tests] update tests from changes to mininode in #11771 - added by @conscott
    
    [tests] trivial update to hex conversion for readability - added by @conscott
    e97b113b04
  12. jnewbery force-pushed on Feb 14, 2018
  13. jnewbery commented at 0:05 am on February 14, 2018: member
    Thanks to @conscott for rebasing this and fixing up the remaining issues from #11771 and Russ’s review comment.
  14. laanwj assigned MarcoFalke on Mar 5, 2018
  15. MarcoFalke commented at 8:56 pm on March 13, 2018: member
    utACK e97b113b049fa1ca7152373d6ea911d56bf7ef4e
  16. MarcoFalke merged this on Mar 13, 2018
  17. MarcoFalke closed this on Mar 13, 2018

  18. MarcoFalke referenced this in commit 0630974647 on Mar 13, 2018
  19. jnewbery commented at 11:01 pm on March 18, 2018: member

    Not an issue with your code, but eq() is not implemented for CTransaction, so the argument to assert is always true, since none of the tx objects are the same reference (they were copied).

    Agree - this assert: https://github.com/bitcoin/bitcoin/blob/00d1680498c5550e7db1f359202d3433a092fafd/test/functional/p2p_invalid_block.py#L83 should be removed in a future PR.

  20. jnewbery deleted the branch on Mar 18, 2018
  21. MarcoFalke referenced this in commit 9a2db3b3d5 on Apr 5, 2018
  22. codablock referenced this in commit 21040f773f on Sep 30, 2019
  23. codablock referenced this in commit 33c77c4039 on Sep 30, 2019
  24. codablock referenced this in commit e720d73770 on Oct 2, 2019
  25. codablock referenced this in commit d40f2e5825 on Oct 2, 2019
  26. UdjinM6 referenced this in commit beed5cf1f2 on Oct 3, 2019
  27. codablock referenced this in commit 3e72a09c16 on Oct 3, 2019
  28. barrystyle referenced this in commit 2b7f14e055 on Jan 22, 2020
  29. MarcoFalke locked this on Sep 8, 2021

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-09-29 01:12 UTC

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