-
Notifications
You must be signed in to change notification settings - Fork 990
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
API: don't error on missing output #3256
API: don't error on missing output #3256
Conversation
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.
👍 Looks good. Couple of comments about renaming a fn and the api needing to lookup twice.
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.
👍 Lets do this.
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.
👍
When the wallet is querying the api for a list of commitment containing unconfirmed outputs, they show up as errors in the log like this:
This is not really necessary, since it is expected behaviour that some of the commitments are not in the unspent set. Furthermore, those errors were discarded higher up in the call chain, meaning real errors were not propagated to the wallet response properly.
This PR fixes both these behaviours by changing some internal functions from
Result<.., Error>
toResult<Option<..>, Error>
.