-
Notifications
You must be signed in to change notification settings - Fork 38.1k
test: use sendall
when emptying wallet
#25955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: use sendall
when emptying wallet
#25955
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to also change the other occurrences of this usage scenario?
See git grep 'sendtoaddress.*getbalance'
Make sense, let me check other cases and if so, I will update them and change the PR title/desc. |
53efdb1
to
923d245
Compare
sendall
in wallet_groupssendall
when emptying wallet
Thanks for the suggestion, @kouloumos. Force-pushed replacing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recipients receive equal share of the unspecified amount
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 28ea4c7
I think one of the reasons behind sendall
was so that it could be used to simplify functional tests.
test/functional/wallet_basic.py
Outdated
# Get all non-zero utxos together | ||
chain_addrs = [self.nodes[0].getnewaddress(), self.nodes[0].getnewaddress()] | ||
singletxid = self.nodes[0].sendtoaddress(chain_addrs[0], self.nodes[0].getbalance(), "", "", True) | ||
singletxid = self.nodes[0].sendall(recipients=[chain_addrs[0]])['txid'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 923d245 I think that this change can be removed as it is modified in the next commit anyways?
ACK 28ea4c7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 28ea4c7
28ea4c7 test: simplify splitment with `sendall` in wallet_basic (brunoerg) 923d245 test: use `sendall` when emptying wallet (brunoerg) Pull request description: In some tests they have used `sendtoaddress` in order to empty a wallet. With the addition of `sendall`, it makes sense to use it for that. ACKs for top commit: achow101: ACK 28ea4c7 ishaanam: utACK 28ea4c7 w0xlt: ACK bitcoin@28ea4c7 Tree-SHA512: 903136d7df5c65d3c02310d5a84241c9fd11070f69d932b4e188b8ad45c38ab5bc1bd5a9242b3e52d2576665ead14be0a03971a9ad8c00431fed442eba4ca48f
In some tests they have used
sendtoaddress
in order to empty a wallet. With the addition ofsendall
, it makes sense to use it for that.