-
Notifications
You must be signed in to change notification settings - Fork 422
Fix debug panic in full_stack fuzz test
#3602
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8241,24 +8241,22 @@ This indicates a bug inside LDK. Please report this error at https://github.com/ | |
| .and_then(|(funded_chan, monitor)| { | ||
| self.chain_monitor | ||
| .watch_channel(funded_chan.context.channel_id(), monitor) | ||
| .map(|persist_status| (funded_chan, persist_status)) | ||
| .map_err(|()| { | ||
| // We weren't able to watch the channel to begin with, so no | ||
| // updates should be made on it. Previously, full_stack_target | ||
| // found an (unreachable) panic when the monitor update contained | ||
| // within `shutdown_finish` was applied. | ||
| funded_chan.unset_funding_info(); | ||
| ChannelError::close("Channel ID was a duplicate".to_owned()) | ||
| }) | ||
| .map(|persist_status| (funded_chan, persist_status)) | ||
| }) | ||
| { | ||
| Ok((funded_chan, persist_status)) => { | ||
| handle_new_monitor_update!(self, persist_status, peer_state_lock, peer_state, per_peer_state, funded_chan, INITIAL_MONITOR); | ||
| Ok(()) | ||
| }, | ||
| Err(e) => { | ||
| // We weren't able to watch the channel to begin with, so no | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't make any sense to me. Going by the comment,
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW I think this was also the case prior to d4bd56f. Wouldn't the monitor update be applied to the original monitor (since we found a duplicate, the original monitor must still be around)?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh this actually shouldn't be reachable because the monitor update isn't generated without a
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, hmm, maybe the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is quite annoying that we have the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alright, pushed a change adding the assertion. Let me know if I misunderstood what you meant. |
||
| // updates should be made on it. Previously, full_stack_target | ||
| // found an (unreachable) panic when the monitor update contained | ||
| // within `shutdown_finish` was applied. | ||
| chan.unset_funding_info(); | ||
| try_channel_entry!(self, peer_state, Err(e), chan_entry) | ||
| }, | ||
| Err(e) => try_channel_entry!(self, peer_state, Err(e), chan_entry), | ||
| } | ||
| }, | ||
| hash_map::Entry::Vacant(_) => return Err(MsgHandleErrInternal::send_err_msg_no_close("Failed to find corresponding channel".to_owned(), msg.channel_id)) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.