Skip to content
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: check for an output to be unspent. #156

Closed

Conversation

ziggie1984
Copy link
Contributor

@ziggie1984 ziggie1984 commented Aug 18, 2024

Fixes a bug where we would assume outputs are unspent although they were not.

Example:

while sweeping the remote close of this channel:

https://mempool.space/address/bc1q96vq7jhl552ucgy79q7zqny27jmlgq6nmspmcvuw97dgsdedlpusnxamhj

the to_remote addr has unfortunately two outputs of two different channel closures (prob. some kind of LND bug), so when querying for the unspent addr utxos, we need to make sure before including the utxo we query the mempool for the spendness of this UTXO.

to_remote addr has two channel closures associated with it:

https://mempool.space/address/bc1qkvtux0hk28qtn7njdjlym2pmhtq799r36yt8a4cuqs0ejm6z520sz4xkqe

@ziggie1984 ziggie1984 force-pushed the fix-unspent-utxo-api branch 2 times, most recently from f97f60b to ea20722 Compare August 18, 2024 09:54
@ziggie1984 ziggie1984 marked this pull request as ready for review August 18, 2024 09:54
@ziggie1984 ziggie1984 force-pushed the fix-unspent-utxo-api branch 2 times, most recently from 26f9d9f to 0bca88e Compare August 18, 2024 13:31
@ziggie1984
Copy link
Contributor Author

PR was tested by the person who run into this problem, and it worked for him.

@guggero
Copy link
Member

guggero commented Aug 19, 2024

Hey Ziggie. Thanks for the fix. But is it possible you're using an old base? I fixed this in 83aa752, which just hasn't been in a release yet. Can create a release if that helps.

@ziggie1984
Copy link
Contributor Author

True, always a step ahead :).

I think it makes sense to release a new version with this bugfix.

@ziggie1984 ziggie1984 closed this Aug 19, 2024
@guggero
Copy link
Member

guggero commented Aug 19, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants