Move transaction sanitization earlier in the pipeline (#18655)
* Move transaction sanitization earlier in the pipeline * Renamed HashedTransaction to SanitizedTransaction * Implement deref for sanitized transaction * bring back process_transactions test method * Use sanitized transactions for cost model calculation
This commit is contained in:
13
sdk/benches/has_duplicates.rs
Normal file
13
sdk/benches/has_duplicates.rs
Normal file
@ -0,0 +1,13 @@
|
||||
#![feature(test)]
|
||||
|
||||
extern crate test;
|
||||
use solana_sdk::sanitized_transaction::SanitizedTransaction;
|
||||
use test::Bencher;
|
||||
|
||||
#[bench]
|
||||
fn bench_has_duplicates(bencher: &mut Bencher) {
|
||||
bencher.iter(|| {
|
||||
let data = test::black_box([1, 2, 3]);
|
||||
assert!(!SanitizedTransaction::has_duplicates(&data));
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user