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

Bump bitcoin and elements dep #137

Merged
merged 3 commits into from
Jan 17, 2025
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 85 additions & 44 deletions Cargo.lock

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

9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@ arraydeque = "0.5.1"
arrayref = "0.3.6"
base64 = "0.22"
bincode = "1.3.1"
bitcoin = { version = "0.31", features = ["serde"] }
bitcoin = { version = "0.32", features = ["serde"] }
clap = "2.33.3"
crossbeam-channel = "0.5.0"
dirs = "5.0.1"
elements = { version = "0.24", features = ["serde"], optional = true }
elements = { version = "0.25", features = ["serde"], optional = true }
error-chain = "0.12.4"
glob = "0.3"
hex = { package = "hex-conservative", version = "0.1.1" }
itertools = "0.12"
lazy_static = "1.3.0"
libc = "0.2.81"
Expand Down Expand Up @@ -61,8 +60,8 @@ zmq = "0.10.0"


[dev-dependencies]
bitcoind = { version = "0.34.3", features = ["25_0"] }
elementsd = { version = "0.9.2", features = ["22_1_1"] }
bitcoind = { version = "0.36", features = ["25_0"] }
elementsd = { version = "0.11", features = ["22_1_1"] }
electrumd = { version = "0.1.0", features = ["4_5_4"] }
ureq = { version = "2.9", default-features = false, features = ["json"] }
tempfile = "3.10"
Expand Down
2 changes: 1 addition & 1 deletion src/bin/popular-scripts.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
extern crate electrs;

use bitcoin::hex::DisplayHex;
use electrs::{
config::Config,
new_index::{Store, TxHistoryKey},
util::bincode,
};
use hex::DisplayHex;

fn main() {
let config = Config::from_args();
Expand Down
2 changes: 1 addition & 1 deletion src/bin/tx-fingerprint-stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fn main() {
}

let tx: Transaction = deserialize(&value).expect("failed to parse Transaction");
let txid = tx.txid();
let txid = tx.compute_txid();

iter.next();

Expand Down
2 changes: 1 addition & 1 deletion src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use std::time::Duration;
use std::{env, fs, io};

use base64::prelude::{Engine, BASE64_STANDARD};
use bitcoin::hex::FromHex;
use error_chain::ChainedError;
use hex::FromHex;
use rayon::iter::{IndexedParallelIterator, IntoParallelIterator, ParallelIterator};
use serde_json::{from_str, from_value, Value};

Expand Down
2 changes: 1 addition & 1 deletion src/electrum/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ use std::thread;
use std::time::Instant;

use bitcoin::hashes::sha256d::Hash as Sha256dHash;
use bitcoin::hex::DisplayHex;
use crypto::digest::Digest;
use crypto::sha2::Sha256;
use error_chain::ChainedError;
use hex::{self, DisplayHex};
use serde_json::{from_str, Value};

#[cfg(not(feature = "liquid"))]
Expand Down
9 changes: 9 additions & 0 deletions src/elements/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,13 @@ pub mod ebcompact {
self.is_v1_p2tr()
}
}

pub trait TxidCompat {
fn compute_txid(&self) -> elements::Txid;
}
impl TxidCompat for elements::Transaction {
fn compute_txid(&self) -> elements::Txid {
self.txid()
}
}
}
Loading
Loading