Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bech32 dependency #2117

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo-minimal.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53"

[[package]]
name = "bech32"
version = "0.10.0-alpha"
version = "0.10.0-beta"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81cc1dec4c25e5a78c52802eda8e2adf0d2aca57ffc536326b75c0e531ea0a9b"
checksum = "98f7eed2b2781a6f0b5c903471d48e15f56fb4e1165df8a9a2337fd1a59d45ea"

[[package]]
name = "bincode"
Expand Down
4 changes: 2 additions & 2 deletions Cargo-recent.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is automatically @generated by Cargo.

Check warning on line 1 in Cargo-recent.lock

View workflow job for this annotation

GitHub Actions / Test - beta toolchain

Dependencies could be updated

Check warning on line 1 in Cargo-recent.lock

View workflow job for this annotation

GitHub Actions / Test - stable toolchain

Dependencies could be updated

Check warning on line 1 in Cargo-recent.lock

View workflow job for this annotation

GitHub Actions / Test - nightly toolchain

Dependencies could be updated

Check warning on line 1 in Cargo-recent.lock

View workflow job for this annotation

GitHub Actions / Test - 1.48.0 toolchain

Dependencies could be updated
# It is not intended for manual editing.
version = 3

Expand All @@ -16,9 +16,9 @@

[[package]]
name = "bech32"
version = "0.10.0-alpha"
version = "0.10.0-beta"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81cc1dec4c25e5a78c52802eda8e2adf0d2aca57ffc536326b75c0e531ea0a9b"
checksum = "98f7eed2b2781a6f0b5c903471d48e15f56fb4e1165df8a9a2337fd1a59d45ea"

[[package]]
name = "bincode"
Expand Down
2 changes: 1 addition & 1 deletion bitcoin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ rustdoc-args = ["--cfg", "docsrs"]
[dependencies]
internals = { package = "bitcoin-internals", version = "0.2.0" }
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 }
secp256k1 = { version = "0.27.0", default-features = false, features = ["bitcoin_hashes"] }
hex_lit = "0.1.1"
Expand Down
6 changes: 3 additions & 3 deletions bitcoin/src/address/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub enum ParseError {
/// Base58 error.
Base58(base58::Error),
/// Bech32 segwit decoding error.
Bech32(bech32::primitives::decode::SegwitHrpstringError),
Bech32(bech32::segwit::DecodeError),
/// A witness version conversion/parsing error.
WitnessVersion(witness_version::TryFromError),
/// A witness program error.
Expand Down Expand Up @@ -141,8 +141,8 @@ impl From<base58::Error> for ParseError {
fn from(e: base58::Error) -> Self { Self::Base58(e) }
}

impl From<bech32::primitives::decode::SegwitHrpstringError> for ParseError {
fn from(e: bech32::primitives::decode::SegwitHrpstringError) -> Self { Self::Bech32(e) }
impl From<bech32::segwit::DecodeError> for ParseError {
fn from(e: bech32::segwit::DecodeError) -> Self { Self::Bech32(e) }
}

impl From<witness_version::TryFromError> for ParseError {
Expand Down
4 changes: 2 additions & 2 deletions bitcoin/src/address/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ impl<'a> fmt::Display for AddressEncoding<'a> {
let program = witness_program.program().as_bytes();

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 {
bech32::segwit::encode_to_fmt_unchecked(fmt, hrp, version, program)
bech32::segwit::encode_lower_to_fmt_unchecked(fmt, hrp, version, program)
}
}
}
Expand Down