diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f57f699..3003cef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/Cargo.toml b/Cargo.toml index 6d49b42..b976e97 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 } @@ -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" diff --git a/src/bsl/block.rs b/src/bsl/block.rs index ef62c3e..a7326b0 100644 --- a/src/bsl/block.rs +++ b/src/bsl/block.rs @@ -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")] @@ -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)); @@ -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); }); } @@ -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; } diff --git a/src/bsl/transaction.rs b/src/bsl/transaction.rs index 1d1fffc..100a1fa 100644 --- a/src/bsl/transaction.rs +++ b/src/bsl/transaction.rs @@ -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()); }); } }