-
Notifications
You must be signed in to change notification settings - Fork 412
Upstream bindings changes for 0.0.123 #3035
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
Upstream bindings changes for 0.0.123 #3035
Conversation
`onion::message::messenger::PeeledOnion` is a public enum which included the private enum `NextHop`, which is not acceptable. Thus, we here expose `NextHop` but rename it `NextMessageHop` to make clear that it is specific to messages.
We don't actually intend these to be public as they're just for docs but the bindings don't currently parse `#[doc(hidden)]` as "no-export" so we add manual no-export tags as well.
4dab520
to
d5bc9a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
Waiting for CI.
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #3035 +/- ##
==========================================
- Coverage 89.16% 89.15% -0.01%
==========================================
Files 118 117 -1
Lines 97850 97850
Branches 97850 97850
==========================================
- Hits 87244 87235 -9
- Misses 8361 8369 +8
- Partials 2245 2246 +1 ☔ View full report in Codecov by Sentry. |
d5bc9a1
to
dad26ad
Compare
Ugh $ git diff-tree -U1 d5bc9a10 dad26adbdiff --git a/lightning/src/ln/interactivetxs.rs b/lightning/src/ln/interactivetxs.rs
index e3b354ff8..603416208 100644
--- a/lightning/src/ln/interactivetxs.rs
+++ b/lightning/src/ln/interactivetxs.rs
@@ -24,4 +24,4 @@ use crate::events::bump_transaction::{BASE_INPUT_WEIGHT, EMPTY_SCRIPT_SIG_WEIGHT
use crate::ln::channel::TOTAL_BITCOIN_SUPPLY_SATOSHIS;
-use crate::ln::msgs::SerialId;
use crate::ln::msgs;
+use crate::ln::msgs::SerialId;
use crate::ln::types::ChannelId; |
The `PaymentHash`, `PaymentSecret`, `PaymentPreimage`, and `ChannelId` types are all small wrappers around `[u8; 32]` and are used throughout the codebase but were defined in the top-level `ln/mod.rs` file and the relatively sparsely-populated `ln/channel_id.rs` file. Here we move them to a common `types` module and go ahead and update all our in-crate `use` statements to refer to the new module for bindings. We do, however, leave a `pub use` alias for the old paths to avoid upgrade hassle for users.
dad26ad
to
376df87
Compare
Hah, sorry, I should have run the script again rather than assuming it'll print all errors at once... $ git diff-tree -U1 dad26adb 376df8770
diff --git a/lightning/src/ln/onion_utils.rs b/lightning/src/ln/onion_utils.rs
index 02af88fcb..0abcb7de2 100644
--- a/lightning/src/ln/onion_utils.rs
+++ b/lightning/src/ln/onion_utils.rs
@@ -13,4 +13,4 @@ use crate::ln::channelmanager::{HTLCSource, RecipientOnionFields};
use crate::ln::msgs;
-use crate::ln::wire::Encode;
use crate::ln::types::{PaymentHash, PaymentPreimage};
+use crate::ln::wire::Encode;
use crate::routing::gossip::NetworkUpdate;
diff --git a/lightning/src/sign/mod.rs b/lightning/src/sign/mod.rs
index 50c0d2bc0..79edf0aed 100644
--- a/lightning/src/sign/mod.rs
+++ b/lightning/src/sign/mod.rs
@@ -41,2 +41,3 @@ use crate::chain::transaction::OutPoint;
use crate::crypto::utils::{hkdf_extract_expand_twice, sign, sign_with_aux_rand};
+use crate::ln::chan_utils;
use crate::ln::chan_utils::{
@@ -55,3 +56,2 @@ use crate::ln::msgs::{UnsignedChannelAnnouncement, UnsignedGossipMessage};
use crate::ln::script::ShutdownScript;
-use crate::ln::chan_utils;
use crate::ln::types::PaymentPreimage;
diff --git a/rustfmt_excluded_files b/rustfmt_excluded_files
index 51731c40d..29f075c0a 100644
--- a/rustfmt_excluded_files
+++ b/rustfmt_excluded_files
@@ -212,2 +212,3 @@
./lightning/src/ln/shutdown_tests.rs
+./lightning/src/ln/types.rs
./lightning/src/ln/wire.rs |
…ream-123-bindings
No description provided.