Skip to content

Commit 5310ba8

Browse files
committed
Update rust-bitcoin
1 parent d6f41d3 commit 5310ba8

File tree

11 files changed

+22
-20
lines changed

11 files changed

+22
-20
lines changed

background-processor/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2018"
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
bitcoin = "0.24"
10+
bitcoin = "0.26"
1111
lightning = { version = "0.0.12", path = "../lightning", features = ["allow_wallclock_use"] }
1212
lightning-persister = { version = "0.0.1", path = "../lightning-persister" }
1313

fuzz/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ stdin_fuzz = []
1919
[dependencies]
2020
afl = { version = "0.4", optional = true }
2121
lightning = { path = "../lightning", features = ["fuzztarget"] }
22-
bitcoin = { version = "0.24", features = ["fuzztarget"] }
22+
bitcoin = { version = "0.26", features = ["fuzztarget"] }
2323
hex = "0.3"
2424
honggfuzz = { version = "0.5", optional = true }
2525
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git", optional = true }

lightning-c-bindings/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ crate-type = ["staticlib"
1515
,"cdylib"]
1616

1717
[dependencies]
18-
bitcoin = "0.24"
18+
bitcoin = "0.26"
1919
lightning = { version = "0.0.12", path = "../lightning" }
2020

2121
# We eventually want to join the root workspace, but for now, the bindings generation is

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ pub enum Secp256k1Error {
7272
InvalidSecretKey,
7373
InvalidRecoveryId,
7474
InvalidTweak,
75+
TweakCheckFailed,
7576
NotEnoughMemory,
76-
CallbackPanicked,
7777
}
7878
impl Secp256k1Error {
7979
pub(crate) fn from_rust(err: SecpError) -> Self {
@@ -85,6 +85,7 @@ impl Secp256k1Error {
8585
SecpError::InvalidSecretKey => Secp256k1Error::InvalidSecretKey,
8686
SecpError::InvalidRecoveryId => Secp256k1Error::InvalidRecoveryId,
8787
SecpError::InvalidTweak => Secp256k1Error::InvalidTweak,
88+
SecpError::TweakCheckFailed => Secp256k1Error::TweakCheckFailed,
8889
SecpError::NotEnoughMemory => Secp256k1Error::NotEnoughMemory,
8990
}
9091
}

lightning-net-tokio/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ For Rust-Lightning clients which wish to make direct connections to Lightning P2
1010
"""
1111

1212
[dependencies]
13-
bitcoin = "0.24"
13+
bitcoin = "0.26"
1414
lightning = { version = "0.0.12", path = "../lightning" }
1515
tokio = { version = "1.0", features = [ "io-util", "macros", "rt", "sync", "net", "time" ] }
1616

lightning-persister/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Utilities to manage channel data persistence and retrieval.
88
"""
99

1010
[dependencies]
11-
bitcoin = "0.24"
11+
bitcoin = "0.26"
1212
lightning = { version = "0.0.12", path = "../lightning" }
1313
libc = "0.2"
1414

1515
[target.'cfg(windows)'.dependencies]
1616
winapi = { version = "0.3", features = ["winbase"] }
1717

1818
[dev-dependencies.bitcoin]
19-
version = "0.24"
19+
version = "0.26"
2020
features = ["bitcoinconsensus"]
2121

2222
[dev-dependencies]

lightning/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ unsafe_revoked_tx_signing = []
2727
unstable = []
2828

2929
[dependencies]
30-
bitcoin = "0.24"
30+
bitcoin = "0.26"
3131

3232
hex = { version = "0.3", optional = true }
3333
regex = { version = "0.1.80", optional = true }
3434

3535
[dev-dependencies.bitcoin]
36-
version = "0.24"
36+
version = "0.26"
3737
features = ["bitcoinconsensus"]
3838

3939
[dev-dependencies]

lightning/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//! instead of having a rather-separate lightning appendage to a wallet.
2020
2121
#![cfg_attr(not(any(feature = "fuzztarget", feature = "_test_utils")), deny(missing_docs))]
22-
#![forbid(unsafe_code)]
22+
#![cfg_attr(not(any(test, feature = "fuzztarget", feature = "_test_utils")), forbid(unsafe_code))]
2323

2424
// In general, rust is absolutely horrid at supporting users doing things like,
2525
// for example, compiling Rust code for real environments. Disable useless lints

lightning/src/ln/onion_route_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ impl msgs::ChannelUpdate {
219219
use bitcoin::secp256k1::ffi::Signature as FFISignature;
220220
use bitcoin::secp256k1::Signature;
221221
msgs::ChannelUpdate {
222-
signature: Signature::from(FFISignature::new()),
222+
signature: Signature::from(unsafe { FFISignature::new() }),
223223
contents: msgs::UnsignedChannelUpdate {
224224
chain_hash: BlockHash::hash(&vec![0u8][..]),
225225
short_channel_id: 0,

lightning/src/util/ser.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,7 @@ macro_rules! impl_consensus_ser {
707707
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), ::std::io::Error> {
708708
match self.consensus_encode(WriterWriteAdaptor(writer)) {
709709
Ok(_) => Ok(()),
710-
Err(consensus::encode::Error::Io(e)) => Err(e),
711-
Err(_) => panic!("We shouldn't get a consensus::encode::Error unless our Write generated an std::io::Error"),
710+
Err(e) => Err(e),
712711
}
713712
}
714713
}

lightning/src/util/test_utils.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -253,20 +253,22 @@ fn get_dummy_channel_announcement(short_chan_id: u64) -> msgs::ChannelAnnounceme
253253
excess_data: Vec::new(),
254254
};
255255

256-
msgs::ChannelAnnouncement {
257-
node_signature_1: Signature::from(FFISignature::new()),
258-
node_signature_2: Signature::from(FFISignature::new()),
259-
bitcoin_signature_1: Signature::from(FFISignature::new()),
260-
bitcoin_signature_2: Signature::from(FFISignature::new()),
261-
contents: unsigned_ann,
256+
unsafe {
257+
msgs::ChannelAnnouncement {
258+
node_signature_1: Signature::from(FFISignature::new()),
259+
node_signature_2: Signature::from(FFISignature::new()),
260+
bitcoin_signature_1: Signature::from(FFISignature::new()),
261+
bitcoin_signature_2: Signature::from(FFISignature::new()),
262+
contents: unsigned_ann,
263+
}
262264
}
263265
}
264266

265267
fn get_dummy_channel_update(short_chan_id: u64) -> msgs::ChannelUpdate {
266268
use bitcoin::secp256k1::ffi::Signature as FFISignature;
267269
let network = Network::Testnet;
268270
msgs::ChannelUpdate {
269-
signature: Signature::from(FFISignature::new()),
271+
signature: Signature::from(unsafe { FFISignature::new() }),
270272
contents: msgs::UnsignedChannelUpdate {
271273
chain_hash: genesis_block(network).header.block_hash(),
272274
short_channel_id: short_chan_id,

0 commit comments

Comments
 (0)