test: Replace hashlib.new with named constructor #23723

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2112-testNoNew changing 1 files +4 −2
  1. MarcoFalke commented at 1:41 PM on December 9, 2021: member

    A small refactor that doesn't matter too much, but it using the named constructor is nice because:

    • It clarifies that it is a built-in function
    • It is (trivially) faster and less code.
  2. test: Replace hashlib.new with named constructor fa1b63c018
  3. MarcoFalke commented at 1:42 PM on December 9, 2021: member

    This removes the last use of new: git grep 'hashlib.new'.

  4. fanquake added the label Tests on Dec 9, 2021
  5. Zero-1729 commented at 1:58 PM on December 9, 2021: contributor

    ACK fa1b63c01887adff83f16b1bbba3bd159dc51104

    Verified no other instance of hashlib.new after this patch.

  6. w0xlt approved
  7. w0xlt commented at 2:12 PM on December 9, 2021: contributor

    ACK fa1b63c

  8. MarcoFalke merged this on Dec 9, 2021
  9. MarcoFalke closed this on Dec 9, 2021

  10. sidhujag referenced this in commit 777d23670c on Dec 10, 2021
  11. RandyMcMillan referenced this in commit 4c68f61792 on Dec 23, 2021
  12. DrahtBot locked this on Dec 9, 2022
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-17 06:14 UTC

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