[qa] Bug fixes and refactor #7778

pull MarcoFalke wants to merge 4 commits into bitcoin:master from MarcoFalke:Mf1604-qaFixesRefactor changing 28 files +161 −155
  1. MarcoFalke commented at 4:37 PM on March 31, 2016: member

    It is not possible to switch to py3 without fixing those bugs or doing the refactor. (E.g. python2 will silently cast floats to ints where needed, but I'd rather explicitly use ints)

    To aid review, each commit in this pull will either fix bugs or do some refactor.

  2. [qa] Use python2/3 syntax fa524d9ddb
  3. jonasschnelli added the label Tests on Mar 31, 2016
  4. [qa] rpc-tests: Properly use integers, floats fa2cea163b
  5. [qa] mininode: Catch exceptions in got_data faaa3c9b65
  6. MarcoFalke force-pushed on Apr 1, 2016
  7. MarcoFalke commented at 8:15 PM on April 1, 2016: member

    Extended tests pass and enabling python deprecation warnings only give the following "false positive" warnings:

    $ qa/pull-tester/rpc-tests.py -extended | grep -C 1 DeprecationWarning
    /home/marco/workspace/bitcoin/qa/rpc-tests/test_framework/blocktools.py:49: DeprecationWarning: classic int division
      halvings = int(height/150) # regtest
    /home/marco/workspace/bitcoin/qa/rpc-tests/replace-by-fee.py:33: DeprecationWarning: classic long division
      while node.getbalance() < satoshi_round((amount + fee)/COIN):
    /home/marco/workspace/bitcoin/qa/rpc-tests/replace-by-fee.py:39: DeprecationWarning: classic long division
      txid = node.sendtoaddress(new_addr, satoshi_round((amount+fee)/COIN))
    /home/marco/workspace/bitcoin/qa/rpc-tests/replace-by-fee.py:396: DeprecationWarning: classic long division
      split_value = int((initial_nValue-fee)/(MAX_REPLACEMENT_LIMIT+1))
    
  8. [qa] mininode: Combine struct.pack format strings 444480649f
  9. in qa/rpc-tests/test_framework/mininode.py:None in faaa3c9b65 outdated
     201 |      elif len(l) < 0x100000000L:
     202 | -        r = chr(254) + struct.pack("<I", len(l))
     203 | +        r = struct.pack("B", 254) + struct.pack("<I", len(l))
     204 |      else:
     205 | -        r = chr(255) + struct.pack("<Q", len(l))
     206 | +        r = struct.pack("B", 255) + struct.pack("<Q", len(l))
    


    laanwj commented at 6:09 AM on April 2, 2016:

    What about:

    r = struct.pack("<BQ", 255, len(l))
    

    etc?


    MarcoFalke commented at 9:40 AM on April 2, 2016:

    Sure, this makes sense. I've tried to make the diff easier to read but I will address you nit, as it makes the code smaller and possibly easier to read.


    laanwj commented at 12:22 PM on April 3, 2016:

    Thanks, yes I agree with regard to keeping the minimum diff, but indeed it's better to do this small cleanup (which someone is bound to do later) at the same time.

  10. laanwj commented at 1:54 PM on April 3, 2016: member

    Tested ACK 4444806

  11. laanwj merged this on Apr 3, 2016
  12. laanwj closed this on Apr 3, 2016

  13. laanwj referenced this in commit ff5874bcf7 on Apr 3, 2016
  14. MarcoFalke deleted the branch on Apr 3, 2016
  15. btcdrak referenced this in commit 94c68e18d2 on Apr 3, 2016
  16. btcdrak referenced this in commit 640666b22f on Apr 3, 2016
  17. MarcoFalke referenced this in commit ff9b436163 on Apr 5, 2016
  18. nomnombtc referenced this in commit 1423cb6a36 on Nov 11, 2016
  19. nomnombtc referenced this in commit 6609fe639e on Nov 12, 2016
  20. nomnombtc referenced this in commit 4c6cd082b4 on Nov 13, 2016
  21. sickpig referenced this in commit ae89b32687 on Nov 14, 2016
  22. rebroad referenced this in commit 2d05b4f4cf on Dec 7, 2016
  23. zkbot referenced this in commit 025bd44543 on Nov 21, 2020
  24. zkbot referenced this in commit 7a0a268054 on Dec 2, 2020
  25. zkbot referenced this in commit c8896f9907 on Dec 2, 2020
  26. DrahtBot locked this on Sep 8, 2021
Contributors
Labels

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: 2026-04-16 21:15 UTC

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