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

Remove OptionalField and make DataLossProtect fields mandatory #2253

Merged

Commits on May 1, 2023

  1. Make DataLossProtect fields required and remove wrappers

    The fields provided by `DataLossProtect` have been mandatory since
    lightning/bolts@6656b70, regardless
    of whether `option_dataloss_protect` or `option_remote_key` feature bits
    are set.
    
    We move the fields out of `DataLossProtect` to make encoding definitions
    more succinct with `impl_writeable_msg!` and to reduce boilerplate.
    
    This paves the way for completely removing `OptionalField` in subsequent
    commits.
    dunxen committed May 1, 2023
    Configuration menu
    Copy the full SHA
    16d0f2f View commit details
    Browse the repository at this point in the history

Commits on May 2, 2023

  1. Remove OptionalField and move shutdown_scriptpubkey into TLV stream

    As pointed out in lightning/bolts@6656b70,
    we can move the `shutdown_scriptpubkey` field into the TLV streams of
    `OpenChannel` and `AcceptChannel` without affecting the resulting encoding.
    
    We use `WithoutLength` encoding here to ensure that we do not encode a
    length prefix along with `Script` as is normally the case.
    dunxen committed May 2, 2023
    Configuration menu
    Copy the full SHA
    20cd856 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f0b3961 View commit details
    Browse the repository at this point in the history