-
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
Update rust-lightning dependency #164
Update rust-lightning dependency #164
Conversation
927ee99
to
d1e08a0
Compare
d39cbf8
to
6be0604
Compare
d1e08a0
to
4e104b4
Compare
4e104b4
to
15bb7cb
Compare
@Tibo-lg: This PR syncs up our branch with |
@@ -316,6 +316,11 @@ where | |||
SubChannelState::OffChainClosed => { | |||
s.is_offer = true; | |||
s.update_idx -= 1; | |||
|
|||
// We do this to give older channels a chance to upgrade to the new version which |
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.
Honestly I'm not a big fan of this. It feels hacky and error prone. I'd like to have a way to handle upgrading at de-serialization time. Not sure what the best way is to be honest, but for example LDK uses the ReadableArgs
trait for when deserialization requires external data.
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.
Yeah, it was supposed to be hacky in this case.
We don't have to merge this here anyway. I will just update the PR and we can just keep depending on this patch in 10101.
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 you think it's time to take backward compatibility issues seriously, it's probably worth taking the time to find a proper solution (though it's also hard to say how many more breaking changes will be required to reach a stable implementation).
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.
I agree with you on needing to figure out how to do this properly as soon as possible. But we can probably live with this quick fix for now.
15bb7cb
to
34db518
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.
I think you can drop the first commit.
dlc-messages/src/ser_impls.rs
Outdated
@@ -453,7 +453,14 @@ pub fn read_option_cb<R: ::std::io::Read, T, F>( | |||
where | |||
F: Fn(&mut R) -> Result<T, DecodeError>, | |||
{ | |||
let prefix: u8 = Readable::read(reader)?; | |||
let prefix: u8 = match Readable::read(reader) { |
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.
I wonder if it'd be better to have a different option type that allows the field not being present?
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.
Maybe! I thought this patch wouldn't be controversial, but it's fair to say that we don't need it since we dropped the other one. I'll remove this one too!
34db518
to
2400398
Compare
2400398
to
d335349
Compare
The backwards-compatibility problem is associated with the recent upgrade to
rust-lightning:0.0.116
.