1
+ #![ allow( missing_docs) ]
1
2
use criterion:: {
2
3
criterion_group, criterion_main, measurement:: WallTime , BenchmarkGroup , Criterion ,
3
4
} ;
@@ -9,12 +10,12 @@ use proptest::{
9
10
use reth_transaction_pool:: test_utils:: MockTransaction ;
10
11
11
12
/// Transaction Pool trait for benching.
12
- pub trait BenchTxPool : Default {
13
+ trait BenchTxPool : Default {
13
14
fn add_transaction ( & mut self , tx : MockTransaction ) ;
14
15
fn reorder ( & mut self , base_fee : u64 ) ;
15
16
}
16
17
17
- pub fn txpool_reordering ( c : & mut Criterion ) {
18
+ fn txpool_reordering ( c : & mut Criterion ) {
18
19
let mut group = c. benchmark_group ( "Transaction Pool Reordering" ) ;
19
20
20
21
for seed_size in [ 1_000 , 10_000 , 50_000 , 100_000 ] {
@@ -54,7 +55,7 @@ pub fn txpool_reordering(c: &mut Criterion) {
54
55
}
55
56
56
57
fn txpool_reordering_bench < T : BenchTxPool > (
57
- group : & mut BenchmarkGroup < WallTime > ,
58
+ group : & mut BenchmarkGroup < ' _ , WallTime > ,
58
59
description : & str ,
59
60
seed : Vec < MockTransaction > ,
60
61
new_txs : Vec < MockTransaction > ,
@@ -170,7 +171,7 @@ mod implementations {
170
171
171
172
impl PartialEq for MockTransactionWithPriority {
172
173
fn eq ( & self , other : & Self ) -> bool {
173
- self . priority . eq ( & other. priority )
174
+ self . priority == other. priority
174
175
}
175
176
}
176
177
0 commit comments