wallet/rpc: follow-up clean-up/fixes to avoid_reuse#16239
wallet/rpc: follow-up clean-up/fixes to avoid_reuse#16239meshcollider merged 3 commits intobitcoin:masterfrom
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
5e704ab to
c8568bb
Compare
|
@promag Thanks a lot for review! I addressed everything you noted. |
promag
left a comment
There was a problem hiding this comment.
Sorry for the 2nd round, just 2 nits.
c8568bb to
e6564cb
Compare
|
@promag Thanks for thoroughness, it is very appreciated. Addressed all. |
|
I left some review in the other pull, which could be addressed here? |
e6564cb to
5ff6aaa
Compare
|
Addressed @MarcoFalke comments in #13756. Thanks for feedback! |
maflcko
left a comment
There was a problem hiding this comment.
ACK, but what about #13756 (comment)
5ff6aaa to
b59d4c7
Compare
|
@MarcoFalke Thanks, I missed that one. I believe I got all of them this time. Also updated release notes based on your suggestions. |
|
ACK b59d4c7da1b886a0834211e70850127faf3e121e (scrolled through the diff on GitHub) |
b59d4c7 to
7f39c40
Compare
|
@jnewbery thanks! Trimmed tests as suggested. |
|
Code looks good, code review ACK 7f39c40 I'm just slightly unsure about the word "used" in the getbalance RPC, could seem like the balance which has been used (spent) rather than the balance which is "dirty" or "reused" or something |
|
I initially used the word "dirty", but then realized that is internally used for something else in the wallet, and there was a comment about "dirty" being confusing in #13756 (comment)
(in reference to a GUI comment). I'm open for changing it, but I'm not sure what would be a good name for it. |
How about "used address balance" or "reused address balance"? Bit of a mouthful, but at least it's explicit. |
achow101
left a comment
There was a problem hiding this comment.
ACK 7f39c40a332824043e3bef282580daf748131bb4 Read through the diff, looks good.
|
@jnewbery A bit long, maybe.. I mean, if we change it I would ideally like to change it everywhere, including the "avoid_reuse" flags in RPC commands and such. Even "used"/"reused" does not accurately describe what this is referring to, as evident by the fact I as the author screwed it up (thankfully @jnewbery caught that one). "UTXO/balance that was sent to an address after it was spent from" |
jnewbery
left a comment
There was a problem hiding this comment.
ACK 7f39c40a332824043e3bef282580daf748131bb4 (reviewed code and ran tests locally)
I've left a couple of style nits inline. Feel free to take or leave.
Always show the same help topic regardless of wallet flags, and explain that something is not always available, rather than runtime-modifying the help output.
7f39c40 to
71d0344
Compare
|
ACK 71d0344 Thanks for quick turnaround! |
|
re-utACK 71d0344 |
71d0344 docs: release note wording (Karl-Johan Alm) 3d2ff37 wallet/rpc: use static help text (Karl-Johan Alm) 53c3c1e wallet/rpc/getbalances: add entry for 'mine.used' balance in results (Karl-Johan Alm) Pull request description: This addresses a few remaining issues pointed out in #13756: * First commit addresses #13756 (comment) * Second commit addresses #13756 (comment) Ping jnewbery and achow101 as they pointed out these issues. ACKs for commit 71d034: jnewbery: ACK 71d0344 meshcollider: re-utACK 71d0344 Tree-SHA512: 5e28822af0574ad07dbbed21aa2fe7866bf5770b4c0a1c150ad0da8af3152bcfb7170330a7497fa500326c594740ecf63733cf58325821e2811d7b911d5783a0
71d0344 docs: release note wording (Karl-Johan Alm) 3d2ff37 wallet/rpc: use static help text (Karl-Johan Alm) 53c3c1e wallet/rpc/getbalances: add entry for 'mine.used' balance in results (Karl-Johan Alm) Pull request description: This addresses a few remaining issues pointed out in bitcoin#13756: * First commit addresses bitcoin#13756 (comment) * Second commit addresses bitcoin#13756 (comment) Ping jnewbery and achow101 as they pointed out these issues. ACKs for commit 71d034: jnewbery: ACK 71d0344 meshcollider: re-utACK bitcoin@71d0344 Tree-SHA512: 5e28822af0574ad07dbbed21aa2fe7866bf5770b4c0a1c150ad0da8af3152bcfb7170330a7497fa500326c594740ecf63733cf58325821e2811d7b911d5783a0
d8bd97d Fix GCC 7.4.0 warning (Hennadii Stepanov) Pull request description: Having #13756 and #16239 merged cause GCC warning: ``` $ gcc --version gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0 ... $ make -j 4 > /dev/null wallet/wallet.cpp: In member function ‘CWallet::Balance CWallet::GetBalance(int, bool) const’: wallet/wallet.cpp:2269:45: warning: enumeral and non-enumeral type in conditional expression [-Wextra] isminefilter reuse_filter = avoid_reuse ? 0 : ISMINE_USED; ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ ``` Fixed with this PR. ACKs for top commit: practicalswift: utACK d8bd97d promag: ACK d8bd97d. kallewoof: utACK d8bd97d meshcollider: Trivial utACK d8bd97d Tree-SHA512: 2fb315ac82f290c8b9f4e48d1b4526b9babe0717c68593c7bc55cd6c289e64b6322aba72984f39291a9254b57d3f6ba8dbfe03799f510c0c1dc108b21b286732
…lance in results Summary: bitcoin/bitcoin@53c3c1e --- Partial backport of Core [[bitcoin/bitcoin#16239 | PR16239]] Test Plan: ninja ./src/bitcoind -regtest -daemon ./src/bitcoin-cli -regtest getbalances help check that it looks right test_runner.py wallet_avoidreuse Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D6482
Summary: Always show the same help topic regardless of wallet flags, and explain that something is not always available, rather than runtime-modifying the help output. bitcoin/bitcoin@3d2ff37 --- Partial backport of Core [[bitcoin/bitcoin#16239 | PR16239]] Test Plan: ninja ./src/bitcoind -regtest -daemon ./src/bitcoin-cli -regtest help sendtoaddress ./src/bitcoin-cli -regtest help getbalance ./src/bitcoin-cli -regtest help listunspent check help output looks spiffy test_runner.py wallet_avoidreuse Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D6486
Summary: bitcoin/bitcoin@3d2ff37 --- Concludes backport of Core [[bitcoin/bitcoin#16239 | PR16239]] Test Plan: none Reviewers: #bitcoin_abc, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Subscribers: jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D6487
This addresses a few remaining issues pointed out in #13756:
Ping jnewbery and achow101 as they pointed out these issues.