test: refactor: save MiniWallet mode explicitly #25430

pull theStack wants to merge 1 commits into bitcoin:master from theStack:202205-test-refactor-save_mode_for_MiniWallet changing 1 files +14 −14
  1. theStack commented at 3:50 PM on June 20, 2022: member

    Rather than abusing the member variables self._priv_key and self._address to determine the MiniWallet mode, save it explicitly (self._mode) in the constructor and use that instead to increase the readability and maintainability of the code.

  2. fanquake added the label Tests on Jun 20, 2022
  3. DrahtBot commented at 11:54 PM on June 20, 2022: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  4. MarcoFalke commented at 5:33 AM on June 21, 2022: member

    Maybe add a default case of assert 0 for the switch-case statements?

  5. test: refactor: save MiniWallet mode explicitly
    Rather than abusing the member variables self._priv_key and
    self._address to determine the MiniWallet mode, save it explicitly
    instead in the constructor to increase the readability and
    maintainability of the code.
    be8d0dba15
  6. theStack force-pushed on Jun 21, 2022
  7. theStack commented at 8:55 AM on June 21, 2022: member

    Maybe add a default case of assert 0 for the switch-case statements?

    Thanks, done.

  8. MarcoFalke approved
  9. MarcoFalke commented at 9:42 AM on June 21, 2022: member

    review ACK be8d0dba15528ac75a2c73d9f696b1db567d4ca4 🔳

    <details><summary>Show signature</summary>

    Signature:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    review ACK be8d0dba15528ac75a2c73d9f696b1db567d4ca4 🔳
    -----BEGIN PGP SIGNATURE-----
    
    iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
    pUht5Qv7B7+t6K4PznSgERmfJZ82ePam0205AlBDgnrv0EOtUsLXWLm1+lGiwLTH
    900qrc0mOP6V0c6q9MtwhS8UO0hNNOCPGNdmmzjBOZmg+f7grtCfq/LItKUm/YUN
    qVpafM/rHNrqvnVqTYIdPSUpPFBPhAlM74b7BPwI8JdX9tqpWVIYJILz7b5lbNet
    DEgAbIvAmP+cByOYoGP8F6LWOAj7Li1B/DyolnV41Z9So1sbvZeSCbllBq10FiQ9
    QCUo6TyC2isMd8m7sOT6FIegzSVernThYyQ47wHDv2RyNGx1q4v/fOgynuJHHNo7
    oD01nNinam4w6DyeR/Ll2sC40JqH7s6NASK/EmdLafZL+NB4dMaDdXLkxvSvXb0/
    XnlWP5oK3WDL3CqjkKHlXoApbksKuzO4qwFyi4IrXdgdNAzbvfEXKFfpcIususme
    HaDQKFCPP5jfNIEFLkUAXUDB+Tfvwe7/CzeHcLMnpXNuriAHVE5D3PI4Uui7wYLe
    yrrsSwQX
    =mUkX
    -----END PGP SIGNATURE-----
    

    </details>

  10. MarcoFalke merged this on Jun 21, 2022
  11. MarcoFalke closed this on Jun 21, 2022

  12. kouloumos commented at 10:05 AM on June 21, 2022: member

    ACK be8d0dba15528ac75a2c73d9f696b1db567d4ca4, definitely helps with readability and maintainability! Even with the comments I often had to remind myself what mode each condition implied.

    All tests pass with test/functional/test_runner.py on macOS 10.15

  13. theStack deleted the branch on Jun 21, 2022
  14. sidhujag referenced this in commit da26adbe2f on Jun 21, 2022
  15. DrahtBot locked this on Jun 21, 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: 2026-04-14 21:13 UTC

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