Skip to content

Conversation

gmaxwell
Copy link
Contributor

This applies on top of the coincontrol listaddressgroupings patch
and makes finding eligible outputs from the groups returned
by listaddressgroupings possible.

@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/b74d05db372feb8d03ef6b59d22292896544ad7a for binaries and test log.

@sipa
Copy link
Member

sipa commented Aug 17, 2012

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?

@gmaxwell
Copy link
Contributor Author

Sounds totally reasonable.

@gmaxwell
Copy link
Contributor Author

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"
Copy link
Contributor

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"

@gmaxwell
Copy link
Contributor Author

Denitted.

@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/3e67c12e0965d0cae7995e9698eea4a0f91b4253 for binaries and test log.

@sipa
Copy link
Member

sipa commented Aug 21, 2012

Apart from that, ACK.

@sipa
Copy link
Member

sipa commented Aug 22, 2012

I don't really have a suggestion for making it less ambiguous, and it's a problem that doesn't occur only here.

@gmaxwell
Copy link
Contributor Author

Perhaps [[optional_array_member,...]] ?

@gmaxwell
Copy link
Contributor Author

Rebased for the RPC reorg.

@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/5dfb800b034b6a61eb1da0ef2f5b6d2a4eb5aa0b for binaries and test log.

coderrr and others added 2 commits August 23, 2012 15:55
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)
Copy link
Member

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?

Copy link
Contributor Author

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.

@luke-jr
Copy link
Member

luke-jr commented Aug 24, 2012

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.
gmaxwell added a commit that referenced this pull request Aug 24, 2012
Listunspent txout address filtering and listaddressgroupings
@gmaxwell gmaxwell merged commit c68c4bc into bitcoin:master Aug 24, 2012
suprnurd pushed a commit to chaincoin-legacy/chaincoin that referenced this pull request Dec 5, 2017
* Fix compilation with qt < 5.2

* remove code duplication
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants