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

Add DLC Close message type #86

Merged
merged 19 commits into from
Aug 25, 2021
Merged

Add DLC Close message type #86

merged 19 commits into from
Aug 25, 2021

Conversation

dillionverma
Copy link
Collaborator

@dillionverma dillionverma commented Aug 16, 2021

Use the new DLC Close message type from AtomicFinance/node-dlc#122

@dillionverma dillionverma marked this pull request as ready for review August 24, 2021 14:35
Copy link
Contributor

@matthewjablack matthewjablack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just needs some additional test cases and improved error messages

@@ -222,26 +224,22 @@ describe('dlc provider', () => {
});

it('close', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add a test for passing in fixedInputs to createDlcClose

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to have a test for error cases, such as finalizeDlcClose with dlcClose that has invalid fundingInputs or invalid closeSignature

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, updated tests to reflect that

}

return psbt;
psbt.validateSignaturesOfAllInputs();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to have specific error for which input signature caused the psbt validation to fail

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would automatically throw with that right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea this is something we can probably add later. Would just be nice to be able to see specific errors if close signature or funding inputs signatures were incorrect.

Copy link
Contributor

@matthewjablack matthewjablack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥

@dillionverma dillionverma merged commit 7be8a47 into master Aug 25, 2021
@dillionverma dillionverma deleted the dlc-close branch August 25, 2021 17:09
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.

3 participants