-
Notifications
You must be signed in to change notification settings - Fork 402
rpc: manually add the immature utxos to the db #687
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: manually add the immature utxos to the db #687
Conversation
Before this commit, the rpc backend wouldn't notice the immature utxos (listunspent doesn't return them), making the rpc balance different from the other backend's balance.
// FIXME: This will produce a wrong result if the immature utxo is spent, | ||
// which *should* be impossible. |
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 don't think this warning is necessary, it's impossible to spend immature stuff
.detail | ||
.address | ||
.as_ref() | ||
.expect("Should always be here") |
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.
Some descriptors are encoded as scripts that don't have an address form, so I don't think it's safe to expect here
@danielabrozzoni I'm currently butchering the I'll be completely revamping the portion of code you are working with in this PR... I'm not sure what the best approach would be right now 😅 I'm currently online on Discord if you would like to discuss. |
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 PR is currently replaced by #683 (unless if reviews say otherwise) |
Agreed, I'm closing this for now |
Before this commit, the rpc backend wouldn't notice the immature
utxos (listunspent doesn't return them), making the rpc balance
different from the other backend's balance.
Description
Notes to the reviewers
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features:
CHANGELOG.md
Bugfixes: