-
Notifications
You must be signed in to change notification settings - Fork 41
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
return counterparty pk when rejecting subchannel offer and handle rejected state #182
return counterparty pk when rejecting subchannel offer and handle rejected state #182
Conversation
Useful because we will need to send the reject message afterwards and for that we need the key.
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 but I'd like at least one integration test to make sure the re-opening of a rejected channel is working as expected.
81ac40c
to
e3c3602
Compare
I've added a test https://github.com/p2pderivatives/rust-dlc/compare/81ac40c551203a18be147feca7e4361d02ef2567..e3c3602bdd6d32fd00dbff2577671269ab61cb50 |
|
||
reject_offer(&test_params); | ||
|
||
offer_sub_channel_internal(&test_params, false); |
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.
nit: can you use open_sub_channel
instead since it's there?
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.
done: 5f80d38
I'll squash the last two commits before merged once approved |
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.
Thanks! LGTM
We need to treat the SubChannelState::Rejected same as `OffChainClosed` as otherwise we won't be able to open a new subchannel if an offer was rejected.
5f80d38
to
994864a
Compare
Useful because we will need to send the reject message afterwards and for that we need to know to whom.