aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2017-08-23 14:19:38 +0100
committerHoward Chu <hyc@symas.com>2017-08-23 14:22:25 +0100
commitea15e72d73a6ae148cc6aa4f18ba232b5281f47f (patch)
treee6addcce6092daf1cde2745ce75ae7c6601ab6b1 /src/cryptonote_core
parentMerge pull request #2303 (diff)
downloadmonero-ea15e72d73a6ae148cc6aa4f18ba232b5281f47f.tar.xz
tx_pool: fix crash in stats
if tx receive_time == now. supersedes #2322
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/tx_pool.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index 33b1d4101..73f519079 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -575,7 +575,7 @@ namespace cryptonote
stats.num_10m++;
if (meta.last_failed_height)
stats.num_failing++;
- uint64_t age = now - meta.receive_time;
+ uint64_t age = now - meta.receive_time + (now == meta.receive_time);
agebytes[age].txs++;
agebytes[age].bytes += meta.blob_size;
return true;