Merge rust-bitcoin/rust-bitcoin#2117: Update bech32 dependency
33ee49f8e5
Update bech32 dependency (Tobin C. Harding) Pull request description: Update the `bech32` dependency to use the newly release beta version. The main fix here is silent, a bug fix in `bech32` that was being hit by our fuzzing suite. ACKs for top commit: vincenzopalazzo: ACK33ee49f8e5
clarkmoody: ACK33ee49f8e5
realeinherjar: tACK33ee49f8e5
apoelstra: ACK33ee49f8e5
Tree-SHA512: 1464d00ddc16bb4a3c72e2c6b667c8b115b6fc883cf5b0da03378b9a1ad07b49f5b43e1d8ece56e2a0c6d795d50ea3d809e9245aea69bde4b44d247041c7dcc5
This commit is contained in:
commit
2095faed71
|
@ -16,9 +16,9 @@ checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bech32"
|
name = "bech32"
|
||||||
version = "0.10.0-alpha"
|
version = "0.10.0-beta"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "81cc1dec4c25e5a78c52802eda8e2adf0d2aca57ffc536326b75c0e531ea0a9b"
|
checksum = "98f7eed2b2781a6f0b5c903471d48e15f56fb4e1165df8a9a2337fd1a59d45ea"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bincode"
|
name = "bincode"
|
||||||
|
|
|
@ -16,9 +16,9 @@ checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bech32"
|
name = "bech32"
|
||||||
version = "0.10.0-alpha"
|
version = "0.10.0-beta"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "81cc1dec4c25e5a78c52802eda8e2adf0d2aca57ffc536326b75c0e531ea0a9b"
|
checksum = "98f7eed2b2781a6f0b5c903471d48e15f56fb4e1165df8a9a2337fd1a59d45ea"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bincode"
|
name = "bincode"
|
||||||
|
|
|
@ -36,7 +36,7 @@ rustdoc-args = ["--cfg", "docsrs"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
internals = { package = "bitcoin-internals", version = "0.2.0" }
|
internals = { package = "bitcoin-internals", version = "0.2.0" }
|
||||||
hex = { package = "hex-conservative", version = "0.1.1", default-features = false }
|
hex = { package = "hex-conservative", version = "0.1.1", default-features = false }
|
||||||
bech32 = { version = "0.10.0-alpha", default-features = false }
|
bech32 = { version = "0.10.0-beta", default-features = false }
|
||||||
hashes = { package = "bitcoin_hashes", version = "0.13.0", default-features = false }
|
hashes = { package = "bitcoin_hashes", version = "0.13.0", default-features = false }
|
||||||
secp256k1 = { version = "0.27.0", default-features = false, features = ["bitcoin_hashes"] }
|
secp256k1 = { version = "0.27.0", default-features = false, features = ["bitcoin_hashes"] }
|
||||||
hex_lit = "0.1.1"
|
hex_lit = "0.1.1"
|
||||||
|
|
|
@ -103,7 +103,7 @@ pub enum ParseError {
|
||||||
/// Base58 error.
|
/// Base58 error.
|
||||||
Base58(base58::Error),
|
Base58(base58::Error),
|
||||||
/// Bech32 segwit decoding error.
|
/// Bech32 segwit decoding error.
|
||||||
Bech32(bech32::primitives::decode::SegwitHrpstringError),
|
Bech32(bech32::segwit::DecodeError),
|
||||||
/// A witness version conversion/parsing error.
|
/// A witness version conversion/parsing error.
|
||||||
WitnessVersion(witness_version::TryFromError),
|
WitnessVersion(witness_version::TryFromError),
|
||||||
/// A witness program error.
|
/// A witness program error.
|
||||||
|
@ -141,8 +141,8 @@ impl From<base58::Error> for ParseError {
|
||||||
fn from(e: base58::Error) -> Self { Self::Base58(e) }
|
fn from(e: base58::Error) -> Self { Self::Base58(e) }
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<bech32::primitives::decode::SegwitHrpstringError> for ParseError {
|
impl From<bech32::segwit::DecodeError> for ParseError {
|
||||||
fn from(e: bech32::primitives::decode::SegwitHrpstringError) -> Self { Self::Bech32(e) }
|
fn from(e: bech32::segwit::DecodeError) -> Self { Self::Bech32(e) }
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<witness_version::TryFromError> for ParseError {
|
impl From<witness_version::TryFromError> for ParseError {
|
||||||
|
|
|
@ -264,9 +264,9 @@ impl<'a> fmt::Display for AddressEncoding<'a> {
|
||||||
let program = witness_program.program().as_bytes();
|
let program = witness_program.program().as_bytes();
|
||||||
|
|
||||||
if fmt.alternate() {
|
if fmt.alternate() {
|
||||||
bech32::segwit::encode_to_fmt_unchecked_uppercase(fmt, hrp, version, program)
|
bech32::segwit::encode_upper_to_fmt_unchecked(fmt, hrp, version, program)
|
||||||
} else {
|
} else {
|
||||||
bech32::segwit::encode_to_fmt_unchecked(fmt, hrp, version, program)
|
bech32::segwit::encode_lower_to_fmt_unchecked(fmt, hrp, version, program)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue