Skip to content

Commit 423f837

Browse files
committed
Update bindings branch to 0.0.111 and update rust-bitcoin and secp
1 parent 0ef1156 commit 423f837

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: |
3838
git clone https://github.com/rust-bitcoin/rust-lightning
3939
cd rust-lightning
40-
git checkout 0.0.110-bindings
40+
git checkout 0.0.111-bindings
4141
- name: Rebuild bindings without std, and check the sample app builds + links
4242
run: ./genbindings.sh ./rust-lightning false
4343
- name: Rebuild bindings, and check the sample app builds + links
@@ -88,7 +88,7 @@ jobs:
8888
run: |
8989
git clone https://github.com/rust-bitcoin/rust-lightning
9090
cd rust-lightning
91-
git checkout 0.0.110-bindings
91+
git checkout 0.0.111-bindings
9292
- name: Rebuild bindings using Apple clang, and check the sample app builds + links
9393
run: ./genbindings.sh ./rust-lightning true
9494
- name: Rebuild bindings using upstream clang, and check the sample app builds + links

lightning-c-bindings/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ no-std = ["bitcoin/no-std", "lightning/no-std", "lightning-invoice/no-std", "cor
1919
std = ["bitcoin/std", "lightning/std", "lightning-invoice/std"]
2020

2121
[dependencies]
22-
bitcoin = { version = "0.28", default-features = false }
23-
secp256k1 = { version = "0.22", features = ["global-context", "recovery"] }
22+
bitcoin = { version = "0.29", default-features = false }
23+
secp256k1 = { version = "0.24", features = ["global-context", "recovery"] }
2424
# Note that the following line is matched by genbindings to update the path
25-
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.110-bindings", default-features = false }
26-
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.110-bindings", default-features = false }
27-
lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.110-bindings", default-features = false }
28-
lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.110-bindings", default-features = false }
29-
lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.110-bindings", default-features = false }
25+
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.111-bindings", default-features = false }
26+
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.111-bindings", default-features = false }
27+
lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.111-bindings", default-features = false }
28+
lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.111-bindings", default-features = false }
29+
lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "0.0.111-bindings", default-features = false }
3030

3131
core2 = { version = "0.3.0", optional = true, default-features = false }
3232

lightning-c-bindings/src/c_types/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ pub(crate) use core2::io::{self, Cursor, Read};
2424
#[cfg(feature = "no-std")]
2525
use alloc::{boxed::Box, vec::Vec, string::String};
2626

27+
use core::convert::TryFrom;
28+
2729
#[repr(C)]
2830
/// A dummy struct of which an instance must never exist.
2931
/// This corresponds to the Rust type `Infallible`, or, in unstable rust, `!`
@@ -53,10 +55,12 @@ impl Into<bech32::u5> for u5 {
5355
pub struct WitnessVersion(u8);
5456

5557
impl From<address::WitnessVersion> for WitnessVersion {
56-
fn from(o: address::WitnessVersion) -> Self { Self(o.into_num()) }
58+
fn from(o: address::WitnessVersion) -> Self { Self(o.to_num()) }
5759
}
5860
impl Into<address::WitnessVersion> for WitnessVersion {
59-
fn into(self) -> address::WitnessVersion { address::WitnessVersion::from_num(self.0).expect("WitnessVersion objects must be in the range 0..=16") }
61+
fn into(self) -> address::WitnessVersion {
62+
address::WitnessVersion::try_from(self.0).expect("WitnessVersion objects must be in the range 0..=16")
63+
}
6064
}
6165

6266
#[derive(Clone)]

0 commit comments

Comments
 (0)