treat negatives like zero instead of crashing out (#3899)
This commit is contained in:
parent
c3155a6e39
commit
85554087d1
|
@ -221,13 +221,14 @@ fn sample_tx_count<T: Client>(
|
||||||
let log_prefix = format!("{:21}:", client.transactions_addr());
|
let log_prefix = format!("{:21}:", client.transactions_addr());
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let tx_count = client.get_transaction_count().expect("transaction count");
|
let mut tx_count = client.get_transaction_count().expect("transaction count");
|
||||||
assert!(
|
if tx_count < initial_tx_count {
|
||||||
tx_count >= initial_tx_count,
|
println!(
|
||||||
"expected tx_count({}) >= initial_tx_count({})",
|
"expected tx_count({}) >= initial_tx_count({})",
|
||||||
tx_count,
|
tx_count, initial_tx_count
|
||||||
initial_tx_count
|
|
||||||
);
|
);
|
||||||
|
tx_count = initial_tx_count;
|
||||||
|
}
|
||||||
let duration = now.elapsed();
|
let duration = now.elapsed();
|
||||||
now = Instant::now();
|
now = Instant::now();
|
||||||
let sample = tx_count - initial_tx_count;
|
let sample = tx_count - initial_tx_count;
|
||||||
|
|
Loading…
Reference in New Issue