Skip to content

Commit 563263c

Browse files
committed
Bump 'bitcoin' dependency to 0.32.0
1 parent 5c48faf commit 563263c

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
- uses: dtolnay/rust-toolchain@master
1414
with:
1515
toolchain: ${{ matrix.toolchain }}
16+
- run: cargo update -p cc --precise 1.0.28
17+
1618
- run: cargo build --features bitcoin,sha2
1719
if: ${{ matrix.toolchain == '1.60.0' }}
1820
- run: cargo build --features slice_cache

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ readme = "README.md"
1212
license = "MIT"
1313

1414
[dependencies]
15-
bitcoin_hashes = { version = "0.13", optional = true }
15+
bitcoin_hashes = { version = "0.14", optional = true }
1616
sha2 = { version = "0.10", optional = true }
17-
bitcoin = { version = "0.31.0", optional = true }
17+
bitcoin = { version = "0.32.0", optional = true }
1818
redb = { version = "1.0", optional = true }
1919
hashbrown = { version = "0.14", optional = true }
2020

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

2929
[dev-dependencies]
3030
hex_lit = { version = "0.1", features = ["rust_v_1_46"] }
31-
bitcoin = { version = "0.31.0", features = ["rand"] }
31+
bitcoin = { version = "0.32.0", features = ["rand"] }
3232
bitcoin-test-data = "0.2.0"
3333
tempfile = "3.4.0"
3434

src/bsl/block.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ mod test {
153153
let mut visitor = crate::bsl::FindTransaction::new(txid.clone());
154154
let _ = Block::visit(&mainnet_702861(), &mut visitor);
155155
let tx = visitor.tx_found().unwrap();
156-
assert_eq!(tx.txid(), txid);
156+
assert_eq!(tx.compute_txid(), txid);
157157
}
158158

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

297297
for tx in block.txdata.iter() {
298-
tx_hashes.push(tx.txid())
298+
tx_hashes.push(tx.compute_txid())
299299
}
300300
assert_eq!(tx_hashes.len(), 2500);
301301
black_box((&block, tx_hashes));
@@ -315,7 +315,7 @@ mod bench {
315315
let mut visitor = crate::bsl::FindTransaction::new(txid.clone());
316316
let _ = Block::visit(&mainnet_702861(), &mut visitor);
317317
let tx = visitor.tx_found().unwrap();
318-
assert_eq!(tx.txid(), txid);
318+
assert_eq!(tx.compute_txid(), txid);
319319
core::hint::black_box(tx);
320320
});
321321
}
@@ -332,7 +332,7 @@ mod bench {
332332
let block: bitcoin::Block = deserialize(mainnet_702861()).unwrap();
333333
let mut tx = None;
334334
for current in block.txdata {
335-
if current.txid() == txid {
335+
if current.compute_txid() == txid {
336336
tx = Some(current);
337337
break;
338338
}

src/bsl/transaction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ mod bench {
350350
pub fn txid_bitcoin(bh: &mut Bencher) {
351351
let tx: bitcoin::Transaction = deserialize(&BENCH_TX[..]).unwrap();
352352
bh.iter(|| {
353-
black_box(&tx.txid());
353+
black_box(&tx.compute_txid());
354354
});
355355
}
356356
}

0 commit comments

Comments
 (0)