rustfmt
This commit is contained in:
@ -14,8 +14,8 @@ use rayon::prelude::*;
|
|||||||
use signature::{KeyPair, PublicKey, Signature};
|
use signature::{KeyPair, PublicKey, Signature};
|
||||||
use std::collections::hash_map::Entry::Occupied;
|
use std::collections::hash_map::Entry::Occupied;
|
||||||
use std::collections::{HashMap, HashSet, VecDeque};
|
use std::collections::{HashMap, HashSet, VecDeque};
|
||||||
use std::sync::atomic::{AtomicIsize, Ordering};
|
|
||||||
use std::result;
|
use std::result;
|
||||||
|
use std::sync::atomic::{AtomicIsize, Ordering};
|
||||||
use std::sync::RwLock;
|
use std::sync::RwLock;
|
||||||
use transaction::Transaction;
|
use transaction::Transaction;
|
||||||
|
|
||||||
|
@ -487,14 +487,14 @@ mod tests {
|
|||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use transaction::Transaction;
|
use transaction::Transaction;
|
||||||
|
|
||||||
use subscribers::{Node, Subscribers};
|
|
||||||
use streamer;
|
|
||||||
use std::sync::mpsc::channel;
|
|
||||||
use std::collections::VecDeque;
|
|
||||||
use hash::{hash, Hash};
|
|
||||||
use event::Event;
|
|
||||||
use entry;
|
|
||||||
use chrono::prelude::*;
|
use chrono::prelude::*;
|
||||||
|
use entry;
|
||||||
|
use event::Event;
|
||||||
|
use hash::{hash, Hash};
|
||||||
|
use std::collections::VecDeque;
|
||||||
|
use std::sync::mpsc::channel;
|
||||||
|
use streamer;
|
||||||
|
use subscribers::{Node, Subscribers};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_layout() {
|
fn test_layout() {
|
||||||
@ -774,11 +774,11 @@ mod bench {
|
|||||||
// Seed the 'from' account.
|
// Seed the 'from' account.
|
||||||
let rando0 = KeyPair::new();
|
let rando0 = KeyPair::new();
|
||||||
let tr = Transaction::new(&mint.keypair(), rando0.pubkey(), 1_000, last_id);
|
let tr = Transaction::new(&mint.keypair(), rando0.pubkey(), 1_000, last_id);
|
||||||
let _ = acc.process_verified_transaction(&tr);
|
acc.process_verified_transaction(&tr).unwrap();
|
||||||
|
|
||||||
let rando1 = KeyPair::new();
|
let rando1 = KeyPair::new();
|
||||||
let tr = Transaction::new(&rando0, rando1.pubkey(), 2, last_id);
|
let tr = Transaction::new(&rando0, rando1.pubkey(), 2, last_id);
|
||||||
let _ = acc.process_verified_transaction(&tr);
|
acc.process_verified_transaction(&tr).unwrap();
|
||||||
|
|
||||||
// Finally, return a transaction that's unique
|
// Finally, return a transaction that's unique
|
||||||
Transaction::new(&rando0, rando1.pubkey(), 1, last_id)
|
Transaction::new(&rando0, rando1.pubkey(), 1, last_id)
|
||||||
@ -803,10 +803,7 @@ mod bench {
|
|||||||
drop(skel.historian.sender);
|
drop(skel.historian.sender);
|
||||||
let entries: Vec<Entry> = skel.historian.receiver.iter().collect();
|
let entries: Vec<Entry> = skel.historian.receiver.iter().collect();
|
||||||
assert_eq!(entries.len(), 1);
|
assert_eq!(entries.len(), 1);
|
||||||
assert_eq!(
|
assert_eq!(entries[0].events.len(), txs as usize);
|
||||||
entries[0].events.len(),
|
|
||||||
txs as usize
|
|
||||||
);
|
|
||||||
|
|
||||||
println!("{} tps", tps);
|
println!("{} tps", tps);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user