From 0569e635cfe5d0a0e8b3a1fd877010a8bda643d0 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 22 May 2020 22:01:50 +0000 Subject: rpc: fix comparison of seconds vs microseconds --- src/rpc/rpc_payment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/rpc/rpc_payment.cpp b/src/rpc/rpc_payment.cpp index 6cd52523f..ab6831382 100644 --- a/src/rpc/rpc_payment.cpp +++ b/src/rpc/rpc_payment.cpp @@ -366,7 +366,7 @@ namespace cryptonote for (std::unordered_map::iterator i = m_client_info.begin(); i != m_client_info.end(); ) { std::unordered_map::iterator j = i++; - const time_t t = std::max(j->second.last_request_timestamp, j->second.update_time); + const time_t t = std::max(j->second.last_request_timestamp / 1000000, j->second.update_time); const bool erase = t < ((j->second.credits == 0) ? threshold0 : threshold); if (erase) { -- cgit v1.2.3