-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Listunspent txout address filtering and listaddressgroupings #1672
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
Conversation
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/b74d05db372feb8d03ef6b59d22292896544ad7a for binaries and test log. |
I'd like to keep the Base58 dependency (CBitcoinAddress, storing destinations as strings) out of the core wallet code, and use the internal representation there (CTxDestination); that should be more efficient as well. Can you make the CWallet:: methods work with CTxDestination, and have the RPC code do the transformation to strings? |
Sounds totally reasonable. |
Rebased, switched to CTxDestination, added some help text. I have some code here from a fork that adds some filter argument to listaddressgroupings (e.g. to filter groups by available value), any opinions on it? (I'd have to go cut it out, as the fork was a failed effort to generalize the grouping code that I gave up one once I realized I was adding an email client to it) |
throw runtime_error( | ||
"listunspent [minconf=1] [maxconf=999999]\n" | ||
"listunspent [minconf=1] [maxconf=9999999] ['addr1','addr2',...]\n" |
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.
Nit:
createrawtransaction help uses 'address' and double-quotes:
createrawtransaction [{"txid":txid,"vout":n},...] {address:amount,...}
listunspent help should follow:
"listunspent [minconf=1] [maxconf=9999999] ["address",...]\n"
Denitted. |
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/3e67c12e0965d0cae7995e9698eea4a0f91b4253 for binaries and test log. |
Apart from that, ACK. |
I don't really have a suggestion for making it less ambiguous, and it's a problem that doesn't occur only here. |
Perhaps [[optional_array_member,...]] ? |
Rebased for the RPC reorg. |
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/5dfb800b034b6a61eb1da0ef2f5b6d2a4eb5aa0b for binaries and test log. |
Signed-off-by: Gregory Maxwell <greg@xiph.org>
This applies on top of the coincontrol listaddressgroupings patch and makes finding eligible outputs from the groups returned by listaddressgroupings possible.
if (!pcoin->IsFinal() || !pcoin->IsConfirmed()) | ||
continue; | ||
|
||
if (pcoin->IsCoinBase() && pcoin->GetBlocksToMaturity() > 0) |
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.
I'm not sure it makes sense to exclude unconfirmed/immature transactions from the grouping algorithm?
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.
Right— I agreed. I removed it once; but with all the rewrites and rebases I forgot I'd done that.
Besides comment (on excluding unconfirmed stuff from algo), I didn't find any obvious issues. However, I'm not familiar enough with the rawtx stuff that I place any significant meaning on my review. |
This is cleanup for the listaddressgroupings code. Also add some real help text.
Listunspent txout address filtering and listaddressgroupings
* Fix compilation with qt < 5.2 * remove code duplication
This applies on top of the coincontrol listaddressgroupings patch
and makes finding eligible outputs from the groups returned
by listaddressgroupings possible.