From a7663639084937ab67a89cc8f75a2734d285645a Mon Sep 17 00:00:00 2001 From: catena Date: Mon, 6 Jun 2016 18:18:17 +0300 Subject: [PATCH] Fix old transactions clearing --- .../scala/scorex/transaction/SimpleTransactionModule.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scorex-transaction/src/main/scala/scorex/transaction/SimpleTransactionModule.scala b/scorex-transaction/src/main/scala/scorex/transaction/SimpleTransactionModule.scala index 0bcd0fed..82d4741c 100644 --- a/scorex-transaction/src/main/scala/scorex/transaction/SimpleTransactionModule.scala +++ b/scorex-transaction/src/main/scala/scorex/transaction/SimpleTransactionModule.scala @@ -126,8 +126,8 @@ class SimpleTransactionModule(implicit val settings: TransactionSettings with Se val txs = utxStorage.all() val notTooOld = txs.filter { tx => - if ((lastBlockTs - tx.timestamp).seconds > MaxTimeForUnconfirmed) utxStorage.remove(tx) - (lastBlockTs - tx.timestamp).seconds <= MaxTimeForUnconfirmed + if ((lastBlockTs - tx.timestamp).millis > MaxTimeForUnconfirmed) utxStorage.remove(tx) + (lastBlockTs - tx.timestamp).millis <= MaxTimeForUnconfirmed } notTooOld.diff(blockStorage.state.validate(txs)).foreach(tx => utxStorage.remove(tx))