bitcoindevkit / bdk-cli

A CLI wallet library and REPL tool to demo and test the BDK library
Other
108 stars 64 forks source link

Check if psbt is final, before broadcasting #128

Closed rajarshimaitra closed 1 year ago

rajarshimaitra commented 1 year ago

Description

Fixes #97

Add a finalizer check before broadcasting psbts.

Checklists

All Submissions:

notmandatory commented 1 year ago

While I was manually testing I ran into some issues and in the process of making a unit test I ended up rewriting the logic. Mainly I tried to make it easier to read by removing the loop and some of the if/then/else clauses. If this looks OK to you feel free to pull in the commit, or I can push it into your branch. https://github.com/notmandatory/bdk-cli/commit/304e3b9274bd587a3cf19b4c15fd82b503e904a5

rajarshimaitra commented 1 year ago

Yes I briefly checked the logic and looks better than before.. Better to check for malformation also.. Like that you also included tests.. Thanks for this.. Feel free to push it on top of this PR and I will test it out too.. Or we can create a new PR closing this one.. Anything works..

notmandatory commented 1 year ago

Sounds good I'll push it to your branch and also do a rebase on master branch.