Skip to content
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- run: cargo update -p cc --precise 1.0.28

- run: cargo build --features bitcoin,sha2
if: ${{ matrix.toolchain == '1.60.0' }}
- run: cargo build --features slice_cache
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ readme = "README.md"
license = "MIT"

[dependencies]
bitcoin_hashes = { version = "0.13", optional = true }
bitcoin_hashes = { version = "0.14", optional = true }
sha2 = { version = "0.10", optional = true }
bitcoin = { version = "0.31.0", optional = true }
bitcoin = { version = "0.32.0", optional = true }
redb = { version = "1.0", optional = true }
hashbrown = { version = "0.14", optional = true }

Expand All @@ -28,7 +28,7 @@ slice_cache = ["dep:hashbrown"]

[dev-dependencies]
hex_lit = { version = "0.1", features = ["rust_v_1_46"] }
bitcoin = { version = "0.31.0", features = ["rand"] }
bitcoin = { version = "0.32.0", features = ["rand"] }
bitcoin-test-data = "0.2.0"
tempfile = "3.4.0"

Expand Down
8 changes: 4 additions & 4 deletions src/bsl/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ mod test {
let mut visitor = crate::bsl::FindTransaction::new(txid.clone());
let _ = Block::visit(&mainnet_702861(), &mut visitor);
let tx = visitor.tx_found().unwrap();
assert_eq!(tx.txid(), txid);
assert_eq!(tx.compute_txid(), txid);
}

#[cfg(target_pointer_width = "64")]
Expand Down Expand Up @@ -295,7 +295,7 @@ mod bench {
let mut tx_hashes = Vec::with_capacity(block.txdata.len());

for tx in block.txdata.iter() {
tx_hashes.push(tx.txid())
tx_hashes.push(tx.compute_txid())
}
assert_eq!(tx_hashes.len(), 2500);
black_box((&block, tx_hashes));
Expand All @@ -315,7 +315,7 @@ mod bench {
let mut visitor = crate::bsl::FindTransaction::new(txid.clone());
let _ = Block::visit(&mainnet_702861(), &mut visitor);
let tx = visitor.tx_found().unwrap();
assert_eq!(tx.txid(), txid);
assert_eq!(tx.compute_txid(), txid);
core::hint::black_box(tx);
});
}
Expand All @@ -332,7 +332,7 @@ mod bench {
let block: bitcoin::Block = deserialize(mainnet_702861()).unwrap();
let mut tx = None;
for current in block.txdata {
if current.txid() == txid {
if current.compute_txid() == txid {
tx = Some(current);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bsl/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ mod bench {
pub fn txid_bitcoin(bh: &mut Bencher) {
let tx: bitcoin::Transaction = deserialize(&BENCH_TX[..]).unwrap();
bh.iter(|| {
black_box(&tx.txid());
black_box(&tx.compute_txid());
});
}
}