wallet_keypool_topup.py: Test for all keypool address types #14857
pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:keypool_topup_addresstype changing 1 files +39 −24-
instagibbs commented at 1:22 pm on December 2, 2018: memberTo protect against regressions if key scanning is changed.
-
fanquake added the label Tests on Dec 2, 2018
-
in test/functional/wallet_keypool_topup.py:46 in a80edd7e68 outdated
46- self.log.info("Generate keys for wallet") 47- for _ in range(90): 48- addr_oldpool = self.nodes[1].getnewaddress() 49- for _ in range(20): 50- addr_extpool = self.nodes[1].getnewaddress() 51+ for i, output_type in enumerate(["legacy" , "p2sh-segwit", "bech32"]):
practicalswift commented at 2:00 pm on December 3, 2018:Nit: Drop space before “,” :-)
instagibbs commented at 5:13 pm on December 3, 2018:donein test/functional/wallet_keypool_topup.py:48 in a80edd7e68 outdated
54- self.nodes[0].sendtoaddress(addr_oldpool, 10) 55- self.nodes[0].generate(1) 56- self.nodes[0].sendtoaddress(addr_extpool, 5) 57- self.nodes[0].generate(1) 58- sync_blocks(self.nodes) 59+ self.log.info("Generate keys for wallet with address type: " + output_type)
practicalswift commented at 2:01 pm on December 3, 2018:Make this logging lazy by using string format arguments :-)
instagibbs commented at 5:13 pm on December 3, 2018:donepromag commented at 4:01 pm on December 3, 2018: memberutACK.in test/functional/wallet_keypool_topup.py:53 in a80edd7e68 outdated
59+ self.log.info("Generate keys for wallet with address type: " + output_type) 60+ idx = i+1 61+ for _ in range(90): 62+ addr_oldpool = self.nodes[idx].getnewaddress(output_type) 63+ for _ in range(20): 64+ addr_extpool = self.nodes[idx].getnewaddress(output_type)
MarcoFalke commented at 4:44 pm on December 3, 2018:Why are you passing output_type to be the label of the new address?
instagibbs commented at 4:51 pm on December 3, 2018:because this test isn’t actually testing anything. Thanks. Will fix.
instagibbs commented at 5:13 pm on December 3, 2018:done
promag commented at 5:13 pm on December 3, 2018:wow, should we promote named parameters? IIUC it’s missing-addresstype
in L28?
instagibbs commented at 5:16 pm on December 3, 2018:@program learned my lesson and added named params in my fix :)MarcoFalke dismissedMarcoFalke commented at 4:48 pm on December 3, 2018: memberThe test is testing nothingwallet_keypool_topup.py: Test for all keypool address types 0dcac51049instagibbs force-pushed on Dec 3, 2018instagibbs commented at 5:14 pm on December 3, 2018: memberTested that the returned addresses appear to be the expected type.meshcollider commented at 5:33 pm on December 11, 2018: contributorMarcoFalke merged this on Dec 11, 2018MarcoFalke closed this on Dec 11, 2018
MarcoFalke referenced this in commit 7701b62561 on Dec 11, 2018Munkybooty referenced this in commit 26640f9f56 on Aug 5, 2021MarcoFalke locked this on Sep 8, 2021
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-12-18 21:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me