-
Notifications
You must be signed in to change notification settings - Fork 38.6k
rpc: Add min_conf option to fund transaction calls #14641
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
|
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. |
|
Will add release notes and tests after some concept ACK. |
|
What is the max_conf for? |
|
@gmaxwell just followed bitcoin/src/wallet/rpcwallet.cpp Lines 2592 to 2598 in 742ee21
|
|
Concept ACK. |
|
Is it reasonable to add these options to coin control? |
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
Maybe you can add some test cases to the rpc_fundrawtransaction.py as well to make sure coin selection fails if conditions are not met?
Nevermind, I see the note about tests.
|
I believe the max exists for listunspent so that with the other flags you can see only unconfirmed outputs, which wouldn't apply here, I think. The maximum argument turns out to be a severe nuisance on listunspent because 99.99999% of the time you want it set to maximum and 'maximum' is some arbitrary big number but too big and the rpc is rejected (and that threshold even changed once, breaking all my spending automation). ... but there it's not an optional argument, so I think the same nuisance wouldn't apply here. Still, we're left with functionality being added where no one can articulate a reason. I don't think that is acceptable, esp where if it ever became useful it could be added without breaking compatibility. |
|
@promag I think in such a specific case they can manually pick the inputs to fund the transaction with, I agree with the comments above and think |
d5e1b6c to
d430696
Compare
|
Rebased and removed |
d430696 to
235bd74
Compare
promag
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.
Current default for min_conf is 0.
|
Concept ACK |
1 similar comment
|
Concept ACK |
0c328a4 to
2b11f02
Compare
|
Added tests and release notes. Is this useful for 0.17 branch (after 0.17.1)? |
2b11f02 to
493047a
Compare
493047a to
3831c98
Compare
5bb1356 to
a3991b7
Compare
.gitignore
Outdated
| *.orig | ||
| *.pyc | ||
| *.o | ||
| *.o.* |
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.
Why?
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 glad you ask 😄try running make -j10 and in parallel run git status. Some editors will refresh showing these temporary files (mostly *.o.tmp).
Edit 2: at least on macos.
Edit: happy to submit this in a separate PR.
|
On pull request is removing min conf, the other is adding it. Would be nice if there was a uniform general direction.
|
|
This is similar to |
|
@promag here's a rebase you can use master...luke-jr:fundraw_minconf |
|
Thanks @luke-jr! |
a3991b7 to
55a0b4c
Compare
|
🐙 This pull request conflicts with the target branch and needs rebase. |
|
While looking for this functionability I found this PR, and I also had the same concerns as @gmaxwell regarding the trusted/untrusted. However could we use instead bitcoin/src/wallet/coinselection.cpp Lines 331 to 336 in e2ff5e7
and implement it at either Lines 2484 to 2491 in e2ff5e7
?. This way we can set I'm interested in submitting a PR in case the proposed resolution is correct. |
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
1 similar comment
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
|
Marked "up for grabs" |
…psbt [as deprecated] Github-Pull: bitcoin#14641 Rebased-From: 965628a [partial]
Github-Pull: bitcoin#14641 Rebased-From: 4138cb3
…ansaction calls cfe5aeb rpc: add minconf and maxconf options to sendall (ishaanam) a07a413 Wallet/RPC: Allow specifying min & max chain depth for inputs used by fund calls (Juan Pablo Civile) Pull request description: This PR adds a "minconf" option to `fundrawtransaction`, `walletcreatefundedpsbt`, and `sendall`. Alternative implementation of #14641 Fixes #14542 Edit: This PR now also adds this option to `send` ACKs for top commit: achow101: ACK cfe5aeb Xekyo: ACK cfe5aeb furszy: diff ACK cfe5aeb, only a non-blocking nit. Tree-SHA512: 836e610926eec3a62308fba88ddbd6a13d8f4dac37352d0309599f893cde9c1df5e9c298fda6e076493068e4d213e4afa7290a9e3bdb5a95a5d507da3f7b59e8
This PR adds min_conf option to
fundrawtransactionandwalletcreatefundedpsbtRPC.Fixes #14542.