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

Misc Tweaks for bindings #2847

Merged

Commits on Jan 24, 2024

  1. [bindings] Drop the lifetime bound on Record for bindings builds

    Because log `Record`s are now being passed by ownership to `log`,
    the bindings get quite annoyed that there's a lifetime hanging
    around. We already don't use this lifetime in bindings (the
    `FormatArgs` is converted to a string and stored on the heap), so
    we can just drop the lifetime, even though it requires some
    macro'ing of the struct definition to do so.
    TheBlueMatt committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    e5c0c62 View commit details
    Browse the repository at this point in the history
  2. [bindings] Mark WithContext log wrapper with no-export

    There's not a lot of reason for downstream users to use the
    `WithContext` wrapper, it mostly exists for our own downstream
    crates anyway, and dealing with lifetimes in bindings isn't super
    practical, so simply no-export it.
    TheBlueMatt committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    4764fa3 View commit details
    Browse the repository at this point in the history
  3. [bindings] No-export RouteHopCandidate lifetime'd fields

    The bindings cannot express lifetimes, so exposing any field which
    is a reference (and not `clone`-able, at least for garbage
    collected language bindings) is unsafe for those expecting a
    high-level interface.
    
    Thus, we simply no-export the `RouteHopCandidate` inner struct
    fields which are references (there are relevant accessors for them
    anyway).
    TheBlueMatt committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    a5ba339 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2024

  1. Fix three_hop_blinded_path_success with different randomization

    In `three_hop_blinded_path_success`, the nodes in the test ended up
    at radically different block heights after channel opening. At that
    point, if the CLTV randomization is done slightly different the
    test payment may fail, which we fix here by ensuring all nodes are
    at the same height before we go to send a payment.
    TheBlueMatt committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    3716227 View commit details
    Browse the repository at this point in the history
  2. Store EntropySource in DefaultRouter instead of passing it

    ...as an arg to `Router`. Passing an `EntropySource` around all
    the time is a bit strange as the `Router` may or may not actually
    use it, and the `DefaultRouter` can just as easily store it.
    TheBlueMatt committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    5d5c818 View commit details
    Browse the repository at this point in the history
  3. Move RGS GraphSyncError into the top-level module

    The top-level module is only a few hundred lines, so there's not a
    lot of reason to hide the `GraphSyncError` in its own module.
    Instead, we simply move it to the top-level `lib.rs`, which doesn't
    change the public API as it was previously re-exported at the top
    level.
    TheBlueMatt committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    8805d06 View commit details
    Browse the repository at this point in the history
  4. Drop manual Debug impl on RGS' GraphSyncError

    As it does the same thing as a derived `Debug` does anyway.
    TheBlueMatt committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    0a14559 View commit details
    Browse the repository at this point in the history
  5. [bindings] Move additional score params from &() to Default

    In 26c1639 (and later in
    50c55dc) we switched to using
    `Default::default()` to initialize `()` for scoring parameters in
    tests. A number of `()`s slipped back in recently, which we replace
    here.
    TheBlueMatt committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    fb693ec View commit details
    Browse the repository at this point in the history