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

Split prefunding Channel items into Inbound/Outbound channels #2054

Closed

Commits on Feb 27, 2023

  1. Split prefunding Channel items into Inbound/Outbound channels

    Currently, funded and unfunded channels are represented by a single `Channel`
    struct. This ends up conflating certain state and makes it harder to reason
    about / less safe to call appropriate methods on `Channel` to advance state.
    
    This aims to make prefunded vs. funded state more type-safe and logically separated.
    Prefunded channels are further split into `InboundChannel`s and `OutboundChannel`s.
    This makes it a compile-time error to call methods only meant for `InboundChannel`s
    on `OutboundChannels` and vice versa. This Inbound/Outbound separation for channels
    using V1 channel establishment, are still very useful when it comes to V2 channel
    establishment (dual-funded channels): it enhances type safety for what actions the
    V2 channel initiator (Outbound) and non-iniator (Inbound) can take on these objects
    once they support V2 channel establishment in future work.
    dunxen committed Feb 27, 2023
    Configuration menu
    Copy the full SHA
    874d09a View commit details
    Browse the repository at this point in the history