Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reset the channel state before restarting the channel establishment p…
…rocess. 1. When our counterparty disconnects during channel creation, we could have progressed along the channel creation process. 2. In such cases, retrying to send the OpenChannel message would fail because the channel state had progressed, leading to a panic in the `get_open_channel`. 3. To prevent this issue, introduce a new function, `reset_channel_state`, which resets the channel state to its initial state and use it before regenerating the OpenChannel message for an Unfunded Outbound channel. Fixes [lightningdevkit#2982](lightningdevkit#2982) (Identified by the full_stack_target fuzzer)
- Loading branch information