-
Notifications
You must be signed in to change notification settings - Fork 366
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
Misc Tweaks for bindings #2847
Commits on Jan 24, 2024
-
[bindings] Drop the lifetime bound on
Record
for bindings buildsBecause 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.
Configuration menu - View commit details
-
Copy full SHA for e5c0c62 - Browse repository at this point
Copy the full SHA e5c0c62View commit details -
[bindings] Mark
WithContext
log wrapper with no-exportThere'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.
Configuration menu - View commit details
-
Copy full SHA for 4764fa3 - Browse repository at this point
Copy the full SHA 4764fa3View commit details -
[bindings] No-export
RouteHopCandidate
lifetime'd fieldsThe 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).
Configuration menu - View commit details
-
Copy full SHA for a5ba339 - Browse repository at this point
Copy the full SHA a5ba339View commit details
Commits on Jan 30, 2024
-
Fix
three_hop_blinded_path_success
with different randomizationIn `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.
Configuration menu - View commit details
-
Copy full SHA for 3716227 - Browse repository at this point
Copy the full SHA 3716227View commit details -
Store
EntropySource
inDefaultRouter
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.
Configuration menu - View commit details
-
Copy full SHA for 5d5c818 - Browse repository at this point
Copy the full SHA 5d5c818View commit details -
Move RGS
GraphSyncError
into the top-level moduleThe 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.
Configuration menu - View commit details
-
Copy full SHA for 8805d06 - Browse repository at this point
Copy the full SHA 8805d06View commit details -
Drop manual
Debug
impl on RGS'GraphSyncError
As it does the same thing as a derived `Debug` does anyway.
Configuration menu - View commit details
-
Copy full SHA for 0a14559 - Browse repository at this point
Copy the full SHA 0a14559View commit details -
Configuration menu - View commit details
-
Copy full SHA for fb693ec - Browse repository at this point
Copy the full SHA fb693ecView commit details