This PR adds test coverage for listlabels command when specifying the purpose (send and receive).
test: add coverage for `purpose` arg in `listlabels` #26730
pull brunoerg wants to merge 1 commits into bitcoin:master from brunoerg:2022-12-wallet-labels-verbose changing 1 files +8 −2-
brunoerg commented at 2:13 PM on December 20, 2022: contributor
-
DrahtBot commented at 2:13 PM on December 20, 2022: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK kristapsk Concept ACK yusufsahinhamza, rserranon If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
- DrahtBot added the label Tests on Dec 20, 2022
-
test: add coverage for `purpose` arg in `listlabels` c467cfffce
- brunoerg force-pushed on Dec 20, 2022
-
yusufsahinhamza commented at 11:09 PM on December 20, 2022: contributor
Concept ACK
-
in test/functional/wallet_labels.py:89 in c467cfffce
82 | @@ -83,8 +83,14 @@ def run_test(self): 83 | label.add_receive_address(address) 84 | label.verify(node) 85 | 86 | + # Check listlabels when passing 'purpose' 87 | + node2_addr = self.nodes[1].getnewaddress() 88 | + node.setlabel(node2_addr, "node2_addr") 89 | + assert_equal(node.listlabels(purpose="send"), ["node2_addr"])
rserranon commented at 1:56 AM on January 11, 2023:It is not clear to me why node2_addr is a
sendaddress, I tried to replicate it in regtest but all my new addresses arereceiveaddresses, maybe is worth clarifying it.
brunoerg commented at 12:43 PM on January 11, 2023:node = self.nodes[0]-> so,noderefers toself.nodes[0].Here we are getting a new address from
self.nodes[1], so it will receive btc using this address. For this reason, it can be used byself.nodes[0]to send Bitcoins.So,
node2_addrforself.nodes[1]is "receive" and forself.nodes[0]is "send".rserranon changes_requestedrserranon commented at 1:58 AM on January 11, 2023: noneConcept ACK, Test ACK
kristapsk approvedkristapsk commented at 12:52 PM on January 11, 2023: contributorACK c467cfffcebb30f829eeb8160166a6b941d97ed6
maflcko referenced this in commit b168b71a5d on Jan 11, 2023maflcko closed this on Jan 11, 2023sidhujag referenced this in commit 26bbb33e44 on Jan 11, 2023bitcoin locked this on Jan 11, 2024
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-05-02 03:13 UTC
More mirrored repositories can be found on mirror.b10c.me