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.
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-
theStack commented at 3:50 PM on June 20, 2022: member
- fanquake added the label Tests on Jun 20, 2022
-
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.
-
MarcoFalke commented at 5:33 AM on June 21, 2022: member
Maybe add a default case of
assert 0for the switch-case statements? -
be8d0dba15
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.
- theStack force-pushed on Jun 21, 2022
-
theStack commented at 8:55 AM on June 21, 2022: member
Maybe add a default case of
assert 0for the switch-case statements?Thanks, done.
- MarcoFalke approved
-
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>
- MarcoFalke merged this on Jun 21, 2022
- MarcoFalke closed this on Jun 21, 2022
-
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.pyon macOS 10.15 - theStack deleted the branch on Jun 21, 2022
- sidhujag referenced this in commit da26adbe2f on Jun 21, 2022
- DrahtBot locked this on Jun 21, 2023
Contributors
Labels