Update bindings branch to 0.0.111 and update rust-bitcoin and secp
authorMatt Corallo <git@bluematt.me>
Mon, 19 Sep 2022 14:56:41 +0000 (14:56 +0000)
committerMatt Corallo <git@bluematt.me>
Sun, 25 Sep 2022 13:54:12 +0000 (13:54 +0000)
.github/workflows/build.yml
lightning-c-bindings/Cargo.toml
lightning-c-bindings/src/c_types/mod.rs

index 47382cea346adce88e9230019ccf473861f24e0e..4ad19c462c49bf500c4b5a229e86ebe197cec9a0 100644 (file)
@@ -37,7 +37,7 @@ jobs:
         run: |
           git clone https://github.com/rust-bitcoin/rust-lightning
           cd rust-lightning
-          git checkout 0.0.110-bindings
+          git checkout 0.0.111-bindings
       - name: Rebuild bindings without std, and check the sample app builds + links
         run: ./genbindings.sh ./rust-lightning false
       - name: Rebuild bindings, and check the sample app builds + links
@@ -88,7 +88,7 @@ jobs:
         run: |
           git clone https://github.com/rust-bitcoin/rust-lightning
           cd rust-lightning
-          git checkout 0.0.110-bindings
+          git checkout 0.0.111-bindings
       - name: Rebuild bindings using Apple clang, and check the sample app builds + links
         run: ./genbindings.sh ./rust-lightning true
       - name: Rebuild bindings using upstream clang, and check the sample app builds + links
index be1db7e1467760aba335f94e251e8917dd1d7b13..02dfc5463d3e04a1d0257033196c5169f0354ce3 100644 (file)
@@ -19,14 +19,14 @@ no-std = ["bitcoin/no-std", "lightning/no-std", "lightning-invoice/no-std", "cor
 std = ["bitcoin/std", "lightning/std", "lightning-invoice/std"]
 
 [dependencies]
-bitcoin = { version = "0.28", default-features = false }
-secp256k1 = { version = "0.22", features = ["global-context", "recovery"] }
+bitcoin = { version = "0.29", default-features = false }
+secp256k1 = { version = "0.24", features = ["global-context", "recovery"] }
 # Note that the following line is matched by genbindings to update the path
-lightning = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.110-bindings", default-features = false }
-lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.110-bindings", default-features = false }
-lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.110-bindings", default-features = false }
-lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.110-bindings", default-features = false }
-lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.110-bindings", default-features = false }
+lightning = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.111-bindings", default-features = false }
+lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.111-bindings", default-features = false }
+lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.111-bindings", default-features = false }
+lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.111-bindings", default-features = false }
+lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.111-bindings", default-features = false }
 
 core2 = { version = "0.3.0", optional = true, default-features = false }
 
index f706b952456bce87448e707edc32526cdddb7ade..3b574073fcdd23fd100e1dcf05bf7e120159098d 100644 (file)
@@ -24,6 +24,8 @@ pub(crate) use core2::io::{self, Cursor, Read};
 #[cfg(feature = "no-std")]
 use alloc::{boxed::Box, vec::Vec, string::String};
 
+use core::convert::TryFrom;
+
 #[repr(C)]
 /// A dummy struct of which an instance must never exist.
 /// This corresponds to the Rust type `Infallible`, or, in unstable rust, `!`
@@ -53,10 +55,12 @@ impl Into<bech32::u5> for u5 {
 pub struct WitnessVersion(u8);
 
 impl From<address::WitnessVersion> for WitnessVersion {
-       fn from(o: address::WitnessVersion) -> Self { Self(o.into_num()) }
+       fn from(o: address::WitnessVersion) -> Self { Self(o.to_num()) }
 }
 impl Into<address::WitnessVersion> for WitnessVersion {
-       fn into(self) -> address::WitnessVersion { address::WitnessVersion::from_num(self.0).expect("WitnessVersion objects must be in the range 0..=16") }
+       fn into(self) -> address::WitnessVersion {
+               address::WitnessVersion::try_from(self.0).expect("WitnessVersion objects must be in the range 0..=16")
+       }
 }
 
 #[derive(Clone)]