Skip to content

Commit

Permalink
Merge pull request #53 from Davidson-Souza/chore/bump-bitcoin-hashes
Browse files Browse the repository at this point in the history
chore: bump bitcoin-hashes 0.12.0 -> 0.14
  • Loading branch information
Davidson-Souza authored Jul 19, 2024
2 parents 7ab9d5f + d116624 commit aebaf2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ homepage = "https://github.com/mit-dci/rustreexo"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bitcoin_hashes = "0.12.0"
bitcoin_hashes = "0.14"
serde = { version = "1.0", features = ["derive"], optional = true }

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions src/accumulator/node_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl From<&[u8; 32]> for NodeHash {
}
#[cfg(test)]
impl TryFrom<&str> for NodeHash {
type Error = hex::Error;
type Error = hex::HexToArrayError;
fn try_from(hash: &str) -> Result<Self, Self::Error> {
// This implementation is useful for testing, as it allows to create empty hashes
// from the string of 64 zeros. Without this, it would be impossible to express this
Expand All @@ -146,7 +146,7 @@ impl TryFrom<&str> for NodeHash {

#[cfg(not(test))]
impl TryFrom<&str> for NodeHash {
type Error = hex::Error;
type Error = hex::HexToArrayError;
fn try_from(hash: &str) -> Result<Self, Self::Error> {
let inner = hex::FromHex::from_hex(hash)?;
Ok(NodeHash::Some(inner))
Expand All @@ -169,7 +169,7 @@ impl FromStr for NodeHash {
fn from_str(s: &str) -> Result<Self, Self::Err> {
NodeHash::try_from(s)
}
type Err = hex::Error;
type Err = hex::HexToArrayError;
}
impl NodeHash {
/// Tells whether this hash is empty. We use empty hashes throughout the code to represent
Expand Down

0 comments on commit aebaf2f

Please sign in to comment.