test: make the node param explicit in init_wallet() #23316

pull lsilva01 wants to merge 1 commits into bitcoin:master from lsilva01:init_wallet_node_param changing 6 files +11 −11
  1. lsilva01 commented at 3:39 am on October 20, 2021: contributor
    This PR changes the definition of def init_wallet(self, i) to def init_wallet(self, *, node) to make the node parameter explicit, as suggested in #22794 (review) .
  2. Make explicit the node param in init_wallet() 7b3c9e4ee8
  3. fanquake added the label Tests on Oct 20, 2021
  4. lsilva01 renamed this:
    Make the node param explicit in init_wallet()
    test: make the node param explicit in init_wallet()
    on Oct 20, 2021
  5. brunoerg commented at 2:36 pm on October 20, 2021: member
    Concept ACK
  6. stratospher commented at 3:39 pm on October 20, 2021: contributor

    tested ACK 7b3c9e4.

    This is a nice change! The function call self.init_wallet(node=0) is more understandable compared to self.init_wallet(0). This call format is also consistent with other functions from the codebase like test_cltv_info and test_dersig_info which are defined in a similar manner. Verified that there aren’t other instances making the init_wallet() call.

  7. MarcoFalke merged this on Oct 20, 2021
  8. MarcoFalke closed this on Oct 20, 2021

  9. in test/functional/wallet_backup.py:129 in 7b3c9e4ee8
    123@@ -124,9 +124,9 @@ def restore_wallet_existent_name(self):
    124         assert_raises_rpc_error(-8, "Wallet name already exists.", node.restorewallet, wallet_name, wallet_file)
    125 
    126     def init_three(self):
    127-        self.init_wallet(0)
    128-        self.init_wallet(1)
    129-        self.init_wallet(2)
    130+        self.init_wallet(node=0)
    131+        self.init_wallet(node=1)
    132+        self.init_wallet(node=2)
    


    jonatack commented at 4:11 pm on October 20, 2021:
    0     def init_three(self):
    1-        self.init_wallet(node=0)
    2-        self.init_wallet(node=1)
    3-        self.init_wallet(node=2)
    4+        for n in range(3):
    5+            self.init_wallet(node=n)
    

    stratospher commented at 6:53 pm on October 20, 2021:
    Made the change in #23327.
  10. jonatack commented at 4:12 pm on October 20, 2021: member
    Posthumous ACK
  11. sidhujag referenced this in commit 190e2200b9 on Oct 20, 2021
  12. lsilva01 deleted the branch on Oct 20, 2021
  13. DrahtBot locked this on Oct 30, 2022

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: 2024-11-17 12:12 UTC

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