From 5e7955b1f127c7eedaccfa7dee9eff827fbae06f Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 23 Sep 2016 18:23:37 +0200 Subject: [PATCH] saturating not overflowing --- ethcore/src/miner/transaction_queue.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethcore/src/miner/transaction_queue.rs b/ethcore/src/miner/transaction_queue.rs index a1b04822c..92c92a5f5 100644 --- a/ethcore/src/miner/transaction_queue.rs +++ b/ethcore/src/miner/transaction_queue.rs @@ -157,7 +157,7 @@ impl TransactionOrder { fn penalize(mut self) -> Self { let current = self.penalties; - self.penalties = match self.penalties.overflowing_add(1) { + self.penalties = match self.penalties.saturating_add(1) { (_, true) => current, (val, false) => val, };