mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-03-03 18:47:47 +01:00
Bump dependencies to bitcoin 0.27 and bech32 0.8
This commit is contained in:
parent
e26c9b051a
commit
3f229052ea
10 changed files with 20 additions and 14 deletions
|
@ -19,7 +19,7 @@ stdin_fuzz = []
|
||||||
[dependencies]
|
[dependencies]
|
||||||
afl = { version = "0.4", optional = true }
|
afl = { version = "0.4", optional = true }
|
||||||
lightning = { path = "../lightning", features = ["fuzztarget"] }
|
lightning = { path = "../lightning", features = ["fuzztarget"] }
|
||||||
bitcoin = { version = "0.26", features = ["fuzztarget", "secp-lowmemory"] }
|
bitcoin = { version = "0.27", features = ["fuzztarget", "secp-lowmemory"] }
|
||||||
hex = "0.3"
|
hex = "0.3"
|
||||||
honggfuzz = { version = "0.5", optional = true }
|
honggfuzz = { version = "0.5", optional = true }
|
||||||
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git", optional = true }
|
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git", optional = true }
|
||||||
|
|
|
@ -10,7 +10,7 @@ Utilities to perform required background tasks for Rust Lightning.
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitcoin = "0.26"
|
bitcoin = "0.27"
|
||||||
lightning = { version = "0.0.99", path = "../lightning", features = ["allow_wallclock_use"] }
|
lightning = { version = "0.0.99", path = "../lightning", features = ["allow_wallclock_use"] }
|
||||||
lightning-persister = { version = "0.0.99", path = "../lightning-persister" }
|
lightning-persister = { version = "0.0.99", path = "../lightning-persister" }
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ rest-client = [ "serde", "serde_json", "chunked_transfer" ]
|
||||||
rpc-client = [ "serde", "serde_json", "chunked_transfer" ]
|
rpc-client = [ "serde", "serde_json", "chunked_transfer" ]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitcoin = "0.26"
|
bitcoin = "0.27"
|
||||||
lightning = { version = "0.0.99", path = "../lightning" }
|
lightning = { version = "0.0.99", path = "../lightning" }
|
||||||
tokio = { version = "1.0", features = [ "io-util", "net", "time" ], optional = true }
|
tokio = { version = "1.0", features = [ "io-util", "net", "time" ], optional = true }
|
||||||
serde = { version = "1.0", features = ["derive"], optional = true }
|
serde = { version = "1.0", features = ["derive"], optional = true }
|
||||||
|
|
|
@ -9,11 +9,11 @@ keywords = [ "lightning", "bitcoin", "invoice", "BOLT11" ]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bech32 = "0.7"
|
bech32 = "0.8"
|
||||||
lightning = { version = "0.0.99", path = "../lightning" }
|
lightning = { version = "0.0.99", path = "../lightning" }
|
||||||
secp256k1 = { version = "0.20", features = ["recovery"] }
|
secp256k1 = { version = "0.20", features = ["recovery"] }
|
||||||
num-traits = "0.2.8"
|
num-traits = "0.2.8"
|
||||||
bitcoin_hashes = "0.9.4"
|
bitcoin_hashes = "0.10"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
lightning = { version = "0.0.99", path = "../lightning", features = ["_test_utils"] }
|
lightning = { version = "0.0.99", path = "../lightning", features = ["_test_utils"] }
|
||||||
|
|
|
@ -15,7 +15,7 @@ honggfuzz_fuzz = ["honggfuzz"]
|
||||||
honggfuzz = { version = "0.5", optional = true }
|
honggfuzz = { version = "0.5", optional = true }
|
||||||
afl = { version = "0.4", optional = true }
|
afl = { version = "0.4", optional = true }
|
||||||
lightning-invoice = { path = ".."}
|
lightning-invoice = { path = ".."}
|
||||||
bech32 = "0.7"
|
bech32 = "0.8"
|
||||||
|
|
||||||
# Prevent this from interfering with workspaces
|
# Prevent this from interfering with workspaces
|
||||||
[workspace]
|
[workspace]
|
||||||
|
|
|
@ -250,7 +250,13 @@ impl FromStr for SignedRawInvoice {
|
||||||
type Err = ParseError;
|
type Err = ParseError;
|
||||||
|
|
||||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||||
let (hrp, data) = bech32::decode(s)?;
|
let (hrp, data, var) = bech32::decode(s)?;
|
||||||
|
|
||||||
|
if var == bech32::Variant::Bech32m {
|
||||||
|
// Consider Bech32m addresses to be "Invalid Checksum", since that is what we'd get if
|
||||||
|
// we didn't support Bech32m (which lightning does not use).
|
||||||
|
return Err(ParseError::Bech32Error(bech32::Error::InvalidChecksum));
|
||||||
|
}
|
||||||
|
|
||||||
if data.len() < 104 {
|
if data.len() < 104 {
|
||||||
return Err(ParseError::TooShortDataPart);
|
return Err(ParseError::TooShortDataPart);
|
||||||
|
|
|
@ -117,7 +117,7 @@ impl Display for SignedRawInvoice {
|
||||||
let mut data = self.raw_invoice.data.to_base32();
|
let mut data = self.raw_invoice.data.to_base32();
|
||||||
data.extend_from_slice(&self.signature.to_base32());
|
data.extend_from_slice(&self.signature.to_base32());
|
||||||
|
|
||||||
bech32::encode_to_fmt(f, &hrp, data).expect("HRP is valid")?;
|
bech32::encode_to_fmt(f, &hrp, data, bech32::Variant::Bech32).expect("HRP is valid")?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ For Rust-Lightning clients which wish to make direct connections to Lightning P2
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitcoin = "0.26"
|
bitcoin = "0.27"
|
||||||
lightning = { version = "0.0.99", path = "../lightning" }
|
lightning = { version = "0.0.99", path = "../lightning" }
|
||||||
tokio = { version = "1.0", features = [ "io-util", "macros", "rt", "sync", "net", "time" ] }
|
tokio = { version = "1.0", features = [ "io-util", "macros", "rt", "sync", "net", "time" ] }
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ Utilities to manage Rust-Lightning channel data persistence and retrieval.
|
||||||
unstable = ["lightning/unstable"]
|
unstable = ["lightning/unstable"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitcoin = "0.26"
|
bitcoin = "0.27"
|
||||||
lightning = { version = "0.0.99", path = "../lightning" }
|
lightning = { version = "0.0.99", path = "../lightning" }
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
|
|
||||||
|
|
|
@ -26,13 +26,13 @@ max_level_debug = []
|
||||||
unsafe_revoked_tx_signing = []
|
unsafe_revoked_tx_signing = []
|
||||||
unstable = []
|
unstable = []
|
||||||
|
|
||||||
no_std = ["hashbrown"]
|
no_std = ["hashbrown", "bitcoin/no-std"]
|
||||||
std = []
|
std = ["bitcoin/std"]
|
||||||
|
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitcoin = "0.26"
|
bitcoin = "0.27"
|
||||||
|
|
||||||
hashbrown = { version = "0.11", optional = true }
|
hashbrown = { version = "0.11", optional = true }
|
||||||
hex = { version = "0.3", optional = true }
|
hex = { version = "0.3", optional = true }
|
||||||
|
@ -43,7 +43,7 @@ hex = "0.3"
|
||||||
regex = "0.1.80"
|
regex = "0.1.80"
|
||||||
|
|
||||||
[dev-dependencies.bitcoin]
|
[dev-dependencies.bitcoin]
|
||||||
version = "0.26"
|
version = "0.27"
|
||||||
features = ["bitcoinconsensus"]
|
features = ["bitcoinconsensus"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
|
|
Loading…
Add table
Reference in a new issue