Skip to content

Conversation

danielabrozzoni
Copy link
Member

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:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature
  • I've updated CHANGELOG.md

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

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.
@danielabrozzoni danielabrozzoni added the bug Something isn't working label Jul 28, 2022
@danielabrozzoni danielabrozzoni self-assigned this Jul 28, 2022
Comment on lines +301 to +302
// FIXME: This will produce a wrong result if the immature utxo is spent,
// which *should* be impossible.
Copy link
Member

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")
Copy link
Member

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

@evanlinjin
Copy link
Member

evanlinjin commented Jul 28, 2022

@danielabrozzoni I'm currently butchering the RpcBlockchain codebase in #683 (also for a bugfix) 😟

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.

Copy link
Contributor

@wszdexdrf wszdexdrf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 1e3df6b it works with the problem highlighted in #640

@evanlinjin evanlinjin mentioned this pull request Jul 28, 2022
8 tasks
@evanlinjin
Copy link
Member

This PR is currently replaced by #683 (unless if reviews say otherwise)

@danielabrozzoni
Copy link
Member Author

This PR is currently replaced by #683 (unless if reviews say otherwise)

Agreed, I'm closing this for now

@danielabrozzoni danielabrozzoni deleted the 20220728_rpc_coinbases branch August 16, 2022 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants