Skip to content

Commit

Permalink
Drop bitcoin_hashes as direct dependency
Browse files Browse the repository at this point in the history
Signed-off-by: gcarq <egger.m@protonmail.com>
  • Loading branch information
gcarq committed Apr 13, 2023
1 parent 3fd0490 commit eac927a
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ rust-base58 = "^0.0"
rusty-leveldb = "^1.0.6"
dirs = "^5.0.0"
bitcoin = "^0.30.0"
bitcoin_hashes = "^0.12.0"
rayon = "^1.3"

# The development profile, used for `cargo build`
Expand Down
2 changes: 1 addition & 1 deletion src/blockchain/proto/script/custom.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::blockchain::proto::script::{opcodes, EvaluatedScript, ScriptError, ScriptPattern};
use crate::common::utils;
use bitcoin_hashes::{hash160, Hash};
use bitcoin::hashes::{hash160, Hash};
use rust_base58::ToBase58;
use std::fmt;

Expand Down
2 changes: 1 addition & 1 deletion src/blockchain/proto/script/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use std::fmt;
use crate::blockchain::proto::script::custom::eval_from_bytes_custom;
use bitcoin::address::Payload;
use bitcoin::blockdata::script::Instruction;
use bitcoin::hashes::{hash160, Hash};
use bitcoin::{Address, Network, PubkeyHash, Script};
use bitcoin_hashes::{hash160, Hash};

#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub enum ScriptError {
Expand Down
2 changes: 1 addition & 1 deletion src/common/utils.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use bitcoin::hashes::{sha256, Hash};
use bitcoin::secp256k1::ThirtyTwoByteHash;
use std::path::PathBuf;

use crate::blockchain::parser::types::CoinType;
use bitcoin_hashes::{sha256, Hash};

#[inline]
pub fn sha256(data: &[u8]) -> [u8; 32] {
Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ extern crate time;
#[macro_use]
extern crate clap;
extern crate bitcoin;
extern crate bitcoin_hashes;
extern crate byteorder;
extern crate rayon;
extern crate rust_base58;
Expand Down

0 comments on commit eac927a

Please sign in to comment.