-
Notifications
You must be signed in to change notification settings - Fork 598
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
Verify psbt input data before finalizing #852
Conversation
wallet/psbt.go
Outdated
@@ -389,6 +389,13 @@ func (w *Wallet) FinalizePsbt(keyScope *waddrmgr.KeyScope, account uint32, | |||
return err | |||
} | |||
|
|||
// Let't check that every input has either the nonwitness field or the | |||
// witnessUtxo field populated. | |||
err = psbt.VerifyInputs(packet) |
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.
If we end up calling VerifyInputOutputLen
in VerifyInputs
(see other PR), we might as well replace the call above with this one.
b6b4f40
to
6321f85
Compare
6321f85
to
347e048
Compare
// this call. | ||
// wallet accounts (NP2WKH, P2WKH, P2TR), so any | ||
// key scope provided doesn't impact the result | ||
// of this call. |
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.
👍
515be82
to
4215cb9
Compare
I pushed a new tag |
4215cb9
to
01a2e9d
Compare
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.
LGTM, thanks for the fix 🎉
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.
2/3 🚀
Verify psbt input data before finalizing
Verify psbt input data before finalizing
This relates to lightningnetwork/lnd#7527 and btcsuite/btcd#1964.
This would be my solution where I would fix the problem in lnd, happy to here your thoughts.
Or should we maybe directly check this in the lnd project/package ?