-
Notifications
You must be signed in to change notification settings - Fork 0
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
refactor handling of DLC input validation #1
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.
lgtm
Tests are failing, i need some additional time to get unit test runners working on my machine |
I found the cause of my woes: cashubtc#607 |
…tions This gives the client an explanation for why the input verification failed.
This aims to make the input validation more succinct and line up better with existing input validation code.
This commit groups together a bunch of linter error fixes, some automatic and others (in test_dlc.py) manual.
I've updated this PR to target the latest commit 6b1d04c in cashubtc#576. The overall changes are the same:
I've confirmed tests pass on my machine with |
Good job. I'm gonna merge this. Unfortunately some tests fail because I fucked up. I changed the migration for the DLC table to have the column settled of type BIT instead of BOOL, as I had read that BOOL is not supported across different DBs while BIT is. Apparently it doesn't like the 0 default value for it. |
TransactionErrors
instead of returning false, to give callers better feedback and to mirror the behavior of other input validation codemint/dlc.py
. Instead rely on the recursive SCT secret verification logic inmint/conditions.py
.DLCWitness
toSCTWitness
, reflecting the fact that this data structure is the witness to an SCT secret (including those which may not be related to DLCs at all)