-
Notifications
You must be signed in to change notification settings - Fork 38.7k
rpc: Raise error in getbalance if minconf is not zero #15729
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
|
Similar to #15596. |
|
@MarcoFalke is this what you mean in #15702? |
src/wallet/wallet.cpp
Outdated
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.
This shouldn't count conflicts
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.
IsTrusted already checks GetDepthInMainChain > 0, isn't it enough?
|
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. |
|
This should throw an exception, not simply be ignored... |
7b12646 to
8676e7a
Compare
|
Because if I specify minconf=10, I expect the value with received transactions less than 10 blocks deep to be excluded. Returning a wrong answer is not a reasonable API change. #15596 should probably be throwing an error too. |
|
@luke-jr how about renaming to |
Yes, error is definitely better. Programs ignoring arguments can be incredibly frustrating. |
|
Then when should it throw an error? |
|
|
797e058 to
fbad2ee
Compare
|
Now raising error. |
fbad2ee to
f907ed2
Compare
|
This is ready? |
|
Is this still needed now that #15596 is merged? |
595e5ad to
019872a
Compare
|
Also wallet label? Ping @meshcollider. |
|
With the many minconf PRs and arguments we've had, I think we should at least briefly discuss this in the meeting to make sure people that haven't looked here are ok with the change |
|
Conditional NACK until this has good release notes. I don't like this change, but without a better alternative I think it might be an improvement over the status quo. The release notes here are bad though. If you're going to remove a feature ("tell me my balance ignoring incoming payments with less than min_conf confirmations") that once worked well enough and was more recently broken you should say why you are removing it and what possible alternatives are. I can try to write up some better release notes for this change today, and if anybody else has more information about past or present problems with this feature, it would be useful to post here. (Last discussions I remember having about this were about theoretical problems in potential future implementations of this feature.) |
Agree, these are poor, don't explain the motivation.
I was under the impression there was no intention in fixing the feature. If that's not the case then this should be closed.
|
| { | ||
| {"dummy", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "Remains for backward compatibility. Must be excluded or set to \"*\"."}, | ||
| {"minconf", RPCArg::Type::NUM, /* default */ "0", "Only include transactions confirmed at least this many times."}, | ||
| {"minconf", RPCArg::Type::NUM, /* default */ "0", "Must be zero"}, |
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.
It's very confusing for this to be 0, because it won't actually show unconfirmed incoming transactions, only unconfirmed change. It's not even really 0 by default, but 1, see a few lines below. Since we can't drop it and can't rename it to dummy2, let's add a comment: This is ignored and only remains for backward compatibility. Must be excluded or set to zero.
|
🐙 This pull request conflicts with the target branch and needs rebase. |
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" |
Closes #15702.