-
Notifications
You must be signed in to change notification settings - Fork 38.8k
RPC: listunspent, add "include immature coinbase" flag #25730
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
RPC: listunspent, add "include immature coinbase" flag #25730
Conversation
77b92ea to
8621fbf
Compare
w0xlt
left a comment
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.
Tested ACK 8621fbf
|
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. |
jarolrod
left a comment
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.
tACK 8621fbf672157df5475fc5cbaa6524b4d0f105c7
Generated some blocks on regtest and checked the output of listunspent {args} ... include_immature_coinbase=true, to check that various immature coinbases were infact displayed
8621fbf to
785f78b
Compare
|
thanks for the feedback. |
785f78b to
ee50c00
Compare
jarolrod
left a comment
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 ee50c00a1b3f09234a43f0fca140fcdd5f875ebd
Only change is small comment change and addition of release notes since my last review.
ee50c00 to
36c2676
Compare
36c2676 to
c070ea2
Compare
kouloumos
left a comment
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.
Concept ACK,
Although this flag is already part of the *receivedby* RPCs since #14707, the logic there is different. Therefore this PR changes AvailableCoins (mainly used by CreateTransactionInternal to get the available coins prior to coin selection) in order to allow immature coinbase txns to make it to the available coins list. To accomplish that, it introduces the include_immature_coinbase option as part of coin control.
Is the inclusion of immature coinbase txns in scope for Coin Control features? Is there a create-tx scenario that we will want to choose those txns?
|
Reopened by request |
c070ea2 to
cdb4365
Compare
cdb4365 to
47be4ac
Compare
Good point @kouloumos (sorry for the delay). It shouldn't be there. Just moved it to be another Plus, to make |
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.
Review ACK. Just Nits
9f57166 to
427548d
Compare
aureleoules
left a comment
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 1406f1d0f1db5cd68c2459953ba913e845cb36e2 - LGTM
427548d8df0b2786ee360f443bb07adc264773bc: I verified that the calls with hard-coded values match the defaults of AvailableCoinsParams.
1022c18 to
1424246
Compare
rajarshimaitra
left a comment
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.
ReACK 14242469930701462e39e34525fbd1a32a16daa7
aureleoules
left a comment
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.
reACK 14242469930701462e39e34525fbd1a32a16daa7
kouloumos
left a comment
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 14242469930701462e39e34525fbd1a32a16daa7, with a small nit about naming.
1424246 to
3319eb9
Compare
|
Updated per @kouloumos feedback. tiny diff, only renamed |
|
reACK 3319eb9d3238f6fc02d51694ca5f215c58b7fc0b |
aureleoules
left a comment
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.
reACK 3319eb9d3238f6fc02d51694ca5f215c58b7fc0b
danielabrozzoni
left a comment
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.
Concept ACK, I have a couple of questions (beginner here, sorry :)) and I still haven't tested the code, but overalls it looks good to me!
danielabrozzoni
left a comment
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.
tACK 3319eb9d3238f6fc02d51694ca5f215c58b7fc0b - the code looks good to me (but my C++ experience is limited), I tested locally and it works as expected. As I pointed out in #25728, this makes it way easier to track immature coins - at the moment in BDK we have to use listunspent combined with listtransactions to make sure to track correctly immature utxos.
Thanks for taking care of this! :)
|
Concept ACK |
so we can return the immature coinbase UTXOs as well.
Plus clean callers that use the params default values
-BEGIN VERIFY SCRIPT- sed -i 's/nMinimumAmount/min_amount/g' $(git grep -l nMinimumAmount) sed -i 's/nMaximumAmount/max_amount/g' $(git grep -l nMaximumAmount) sed -i 's/nMinimumSumAmount/min_sum_amount/g' $(git grep -l nMinimumSumAmount) sed -i 's/nMaximumCount/max_count/g' $(git grep -l nMaximumCount) -END VERIFY SCRIPT-
3319eb9 to
fa84df1
Compare
|
Rebased, conflicts solved. |
aureleoules
left a comment
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.
reACK fa84df1
kouloumos
left a comment
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.
reACK fa84df1
|
reACK fa84df1 |
theStack
left a comment
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.
Code-review ACK fa84df1
|
ACK fa84df1 |
…" flag fa84df1 scripted-diff: wallet: rename AvailableCoinsParams members to snake_case (furszy) 61c2265 wallet: group AvailableCoins filtering parameters in a single struct (furszy) f0f6a35 RPC: listunspent, add "include immature coinbase" flag (furszy) Pull request description: Simple PR; adds a "include_immature_coinbase" flag to `listunspent` to include the immature coinbase UTXOs on the response. Requested by bitcoin#25728. ACKs for top commit: danielabrozzoni: reACK fa84df1 achow101: ACK fa84df1 aureleoules: reACK fa84df1 kouloumos: reACK fa84df1 theStack: Code-review ACK fa84df1 Tree-SHA512: 0f3544cb8cfd0378a5c74594480f78e9e919c6cfb73a83e0f3112f8a0132a9147cf846f999eab522cea9ef5bd3ffd60690ea2ca367dde457b0554d7f38aec792
Simple PR; adds a "include_immature_coinbase" flag to
listunspentto include the immature coinbase UTXOs on the response. Requested by #25728.