commit
bc0dde696a
|
@ -39,7 +39,7 @@ impl Accountant {
|
|||
/// Create an Accountant using a deposit.
|
||||
pub fn new_from_deposit(deposit: &Payment) -> Self {
|
||||
let mut balances = HashMap::new();
|
||||
apply_payment(&mut balances, &deposit);
|
||||
apply_payment(&mut balances, deposit);
|
||||
Accountant {
|
||||
balances,
|
||||
pending: HashMap::new(),
|
||||
|
|
|
@ -172,10 +172,9 @@ impl<W: Write + Send + 'static> AccountantSkel<W> {
|
|||
let t_responder =
|
||||
streamer::responder(write, exit.clone(), response_recycler.clone(), r_responder);
|
||||
|
||||
let skel = obj.clone();
|
||||
let t_server = spawn(move || loop {
|
||||
let e = AccountantSkel::process(
|
||||
&skel,
|
||||
&obj,
|
||||
&r_reader,
|
||||
&s_responder,
|
||||
&packet_recycler,
|
||||
|
|
|
@ -39,8 +39,8 @@ fn main() {
|
|||
.collect();
|
||||
let duration = now.elapsed();
|
||||
let ns = duration.as_secs() * 1_000_000_000 + u64::from(duration.subsec_nanos());
|
||||
let bsps = txs as f64 / ns as f64;
|
||||
let nsps = ns as f64 / txs as f64;
|
||||
let bsps = f64::from(txs) / ns as f64;
|
||||
let nsps = ns as f64 / f64::from(txs);
|
||||
println!(
|
||||
"Done. {} thousand signatures per second, {}us per signature",
|
||||
bsps * 1_000_000_f64,
|
||||
|
|
Loading…
Reference in New Issue