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

Small API cleanups pre-0.0.119 #2798

Merged

Commits on Dec 15, 2023

  1. Un-export the PrivateRoute inner field as there are invariants

    When we make the `PrivateRoute` inner `RouteHint` `pub`, we failed
    to note that the `PrivateRoute::new` constructor actually verifies
    a length invariant. Thus, we un-export the inner field and force
    users to go back through the `new` fn.
    TheBlueMatt committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    90cc993 View commit details
    Browse the repository at this point in the history
  2. Drop explicit bitcoin_hashes dependency in lightning-invoice

    Since `lightning-invoice` now depends on the `bitcoin` crate
    directly, also depending on the `bitcoin_hashes` crate is redundant
    and just means we confuse users by setting the `std` flag only on
    `bitcoin`. Thus, we drop the explicit dependency here and replace
    it with `bitcoin::hashes`.
    TheBlueMatt committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    83e76d7 View commit details
    Browse the repository at this point in the history
  3. Make FinalOnionHopData public

    In 4b5db8c, `channelmanager::PendingHTLCRouting` was made
    public, exposing a `FinalOnionHopData` field to the world. However,
    `FinalOnionHopData` was left crate-private, making the enum
    impossible to construct.
    
    There isn't a strong reason for this (even though the
    `FinalOnionHopData` API is somewhat confusing, being separated from
    the rest of the onion structs), so we expose it here.
    TheBlueMatt committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    bb0ddad View commit details
    Browse the repository at this point in the history
  4. Use correct default value when comparing to htlc_maximum_msat

    62f8669 added two
    `htlc_maximum_msat.unwrap_or`s, but used a default value of 0,
    spuriously causing all HTLCs to fail if we don't have an htlc
    maximum value. This should be mostly harmless, but we should fix it
    anyway.
    TheBlueMatt committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    642240e View commit details
    Browse the repository at this point in the history
  5. Fix dev MSRV build of lightning-transaction-sync

    ...due to a transitive dependency of the `bitcoind` crate.
    TheBlueMatt committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    2aecfa4 View commit details
    Browse the repository at this point in the history