[wallet] sendtoaddress output type argument#11489
[wallet] sendtoaddress output type argument#11489kallewoof wants to merge 1 commit intobitcoin:masterfrom
Conversation
b3cebac to
a742bcb
Compare
src/wallet/rpcwallet.cpp
Outdated
There was a problem hiding this comment.
Should default to GetArg("-changestyle")?
src/wallet/rpcwallet.cpp
Outdated
There was a problem hiding this comment.
I think it is preferable to add m_change_style to coin control so that a new key is consumed only when necessary. It can also helps in other send/fund calls. This should be used in:
Line 2679 in f74459d
src/wallet/rpcwallet.cpp
Outdated
There was a problem hiding this comment.
Nit, replace ' with \". See:
bitcoin/src/wallet/rpcdump.cpp
Line 87 in f74459d
a742bcb to
56a0314
Compare
|
@promag Thanks for the review! Very good points. I've updated the code according to your suggestions. |
480a988 to
3e0e821
Compare
|
Closing this as I'm not sure of a good way to stay up to date with the other PR. Will reopen once merged instead. Edit: Reopened post-merge of dependent PR. |
e82ae08 to
6ac76db
Compare
6ac76db to
676b58d
Compare
|
Tend to NACK here. If you really want to control the change type on a per-call basis, maybe you should use createrawtransaction. It is not our goal to support every edge use-case. I doubt the option in sendtoaddress will still be useful two releases in the future and we'd have to deprecate it with way too much effort. Other than that, you could set the change type on the command line or use a more intelligent solution such as #12119 (not yet merged). |
|
I agree with @MarcoFalke. |
|
The next step "down" from |
|
I can understand the motivation to add an option to set the fee explicitly, but I fail to see any reason to support setting the change type. |
This is an attempt at fixing #11134.
It basically adds the output type flag as is, which is then used to generate the change destination.