Skip to content

Commit ffdaaf3

Browse files
committed
chore(deps): bump criterion to 0.7
1 parent 91a3390 commit ffdaaf3

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

crates/chain/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ rusqlite = { version = "0.31.0", features = ["bundled"], optional = true }
2828
rand = "0.8"
2929
proptest = "1.2.0"
3030
bdk_testenv = { path = "../testenv" }
31-
criterion = { version = "0.2" }
31+
criterion = { version = "0.7" }
3232

3333
[features]
3434
default = ["std", "miniscript"]

crates/chain/benches/canonicalization.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use bitcoin::{
77
absolute, constants, hashes::Hash, key::Secp256k1, transaction, Amount, BlockHash, Network,
88
OutPoint, ScriptBuf, Transaction, TxIn, TxOut,
99
};
10-
use criterion::{black_box, criterion_group, criterion_main, Criterion};
10+
use criterion::{criterion_group, criterion_main, Criterion};
1111
use miniscript::{Descriptor, DescriptorPublicKey};
1212
use std::sync::Arc;
1313

@@ -126,7 +126,7 @@ fn run_filter_chain_unspents(tx_graph: &KeychainTxGraph, chain: &LocalChain, exp
126126

127127
pub fn many_conflicting_unconfirmed(c: &mut Criterion) {
128128
const CONFLICTING_TX_COUNT: u32 = 2100;
129-
let (tx_graph, chain) = black_box(setup(|tx_graph, _chain| {
129+
let (tx_graph, chain) = std::hint::black_box(setup(|tx_graph, _chain| {
130130
let previous_output = add_ancestor_tx(tx_graph, tip_block_id(), 0);
131131
// Create conflicting txs that spend from `previous_output`.
132132
let spk_1 = spk_at_index(&tx_graph.index, 1);
@@ -164,7 +164,7 @@ pub fn many_conflicting_unconfirmed(c: &mut Criterion) {
164164

165165
pub fn many_chained_unconfirmed(c: &mut Criterion) {
166166
const TX_CHAIN_COUNT: u32 = 2100;
167-
let (tx_graph, chain) = black_box(setup(|tx_graph, _chain| {
167+
let (tx_graph, chain) = std::hint::black_box(setup(|tx_graph, _chain| {
168168
let mut previous_output = add_ancestor_tx(tx_graph, tip_block_id(), 0);
169169
// Create a chain of unconfirmed txs where each subsequent tx spends the output of the
170170
// previous one.
@@ -203,7 +203,7 @@ pub fn many_chained_unconfirmed(c: &mut Criterion) {
203203
pub fn nested_conflicts(c: &mut Criterion) {
204204
const CONFLICTS_PER_OUTPUT: usize = 3;
205205
const GRAPH_DEPTH: usize = 7;
206-
let (tx_graph, chain) = black_box(setup(|tx_graph, _chain| {
206+
let (tx_graph, chain) = std::hint::black_box(setup(|tx_graph, _chain| {
207207
let mut prev_ops = core::iter::once(add_ancestor_tx(tx_graph, tip_block_id(), 0))
208208
.collect::<Vec<OutPoint>>();
209209
for depth in 1..GRAPH_DEPTH {

crates/chain/benches/indexer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use bitcoin::{
88
absolute, constants, hashes::Hash, key::Secp256k1, transaction, Amount, BlockHash, Network,
99
Transaction, TxIn, TxOut,
1010
};
11-
use criterion::{black_box, criterion_group, criterion_main, Criterion};
11+
use criterion::{criterion_group, criterion_main, Criterion};
1212
use miniscript::Descriptor;
1313
use std::sync::Arc;
1414

@@ -91,7 +91,7 @@ fn do_bench(indexed_tx_graph: &KeychainTxGraph, chain: &LocalChain) {
9191
}
9292

9393
pub fn reindex_tx_graph(c: &mut Criterion) {
94-
let (graph, chain) = black_box(setup(|graph, _chain| {
94+
let (graph, chain) = std::hint::black_box(setup(|graph, _chain| {
9595
// Add relevant txs to graph
9696
for i in 0..TX_CT {
9797
let script_pubkey = graph.index.reveal_next_spk(()).unwrap().0 .1;

crates/electrum/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ electrum-client = { version = "0.24.0", features = [ "proxy" ], default-features
2020
[dev-dependencies]
2121
bdk_testenv = { path = "../testenv" }
2222
bdk_chain = { path = "../chain" }
23-
criterion = { version = "0.2" }
23+
criterion = { version = "0.7" }
2424

2525
[features]
2626
default = ["use-rustls"]

0 commit comments

Comments
 (0)