contrib: Adjust output to current test format #13935

pull AkioNak wants to merge 1 commits into bitcoin:master from AkioNak:testgen_for_key_io_tests changing 3 files +251 −134
  1. AkioNak commented at 9:18 AM on August 10, 2018: contributor

    This PR makes the output of gen_base58_test_vectors.py to fit to current test format. The test has already been changed(separated) from base58_test to key_io_test, so change the file name of this script as well.

    (This will solve #13553 )

  2. AkioNak force-pushed on Aug 10, 2018
  3. laanwj added the label Tests on Aug 10, 2018
  4. AkioNak commented at 2:05 PM on August 12, 2018: contributor

    This script requires segwit_addr.py known as BIP173 Reference implementations for Python. (See https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki#Reference_implementations ) Since it is included in test_framework, we can execute as follows:

    $ PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py valid 50 > ../../src/test/data/key_io_keys_valid.json
    
  5. MarcoFalke added this to the milestone 0.18.0 on Aug 12, 2018
  6. in contrib/testgen/gen_base58_test_vectors.py:229 in 3cc388fa7d outdated
     237 | -                    val += random.choice(b58chars)
     238 | -                else: # replace random character in the middle
     239 | -                    n = random.randint(0, len(val))
     240 | -                    val = val[0:n] + random.choice(b58chars) + val[n+1:]
     241 | +        for template, gen_invalid_vector in [(t, g) for g, l in zip(glist, tlist) for t in l]:
     242 | +            val = gen_invalid_vector(template)
    


    kallewoof commented at 5:49 AM on August 14, 2018:

    A bit long, but maybe call it invalid_vector_generator, since it is very close to the function names above. I thought for a moment it was referring to the function called gen_invalid_vectors but it had an s, I realized.

  7. kallewoof commented at 5:50 AM on August 14, 2018: member

    utACK c7cbd2cd9eb6f8df4348643f0a02d2dbc487197c

  8. AkioNak force-pushed on Aug 14, 2018
  9. AkioNak commented at 8:42 AM on August 14, 2018: contributor

    @kallewoof fixed. -- renamed as below:

    1. from gen_valid_vector to valid_vector_generator
    2. from gen_invalid_vector to invalid_vector_generator
  10. kallewoof commented at 8:56 AM on August 14, 2018: member

    re-utACK 512c25f2348dc01e5dc92e84698ba61c66fcfb5a

  11. laanwj commented at 10:37 AM on August 16, 2018: member

    utACK 512c25f2348dc01e5dc92e84698ba61c66fcfb5a after squash

  12. laanwj commented at 10:46 AM on August 27, 2018: member

    utACK 512c25f after squash

    a reminder to squash this according to the workflow in CONTRIBUTING.md (otherwise, this could be merged)

  13. contrib: Adjust output to current test format
    Ajust the outputs of gen_base58_test_vectors.py to current test format.
    
    1. Add bech32 vector generation.
    2. Add Script-fragments to hexrepr in the format expected by the test.
    3. Modify the metadata.
      1) Change 'isTestnet' to 'chain' (main/test/regtest)
      2) Remove 'addrType'
      3) Add 'tryCaseFlip' (True/False on bech32)
    a9910d82c3
  14. AkioNak force-pushed on Aug 27, 2018
  15. AkioNak commented at 11:21 AM on August 27, 2018: contributor

    @laanwj thanks. squashed.

  16. MarcoFalke referenced this in commit 51a73c9862 on Aug 27, 2018
  17. MarcoFalke merged this on Aug 27, 2018
  18. MarcoFalke closed this on Aug 27, 2018

  19. AkioNak deleted the branch on Aug 30, 2018
  20. Munkybooty referenced this in commit bab4d37c51 on Jun 30, 2021
  21. Munkybooty referenced this in commit bc4a2f4651 on Jul 1, 2021
  22. Munkybooty referenced this in commit 94581ad2eb on Jul 2, 2021
  23. Munkybooty referenced this in commit befc2057df on Jul 2, 2021
  24. Munkybooty referenced this in commit 1d85508b0a on Jul 4, 2021
  25. UdjinM6 referenced this in commit 1fb0578a2a on Jul 7, 2021
  26. Munkybooty referenced this in commit a2f7a745e7 on Jul 7, 2021
  27. UdjinM6 referenced this in commit 4dda24eb6f on Jul 7, 2021
  28. Munkybooty referenced this in commit 0145fee5c7 on Jul 7, 2021
  29. Munkybooty referenced this in commit d6a4bdead4 on Jul 8, 2021
  30. DrahtBot locked this on Sep 8, 2021
Labels

Milestone
0.18.0


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-14 21:14 UTC

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