aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-08-25 00:18:42 +0200
committerRiccardo Spagni <ric@spagni.net>2017-08-25 00:18:42 +0200
commit944bbdb51eaa4aba2d9da89e9a7e71502a8f89e2 (patch)
treebe7d24cc3630df9e54ac772fcb1ee88af0bb09a6 /src
parentMerge pull request #2328 (diff)
parenttx_pool: fix crash in stats (diff)
downloadmonero-944bbdb51eaa4aba2d9da89e9a7e71502a8f89e2.tar.xz
Merge pull request #2330
ea15e72d tx_pool: fix crash in stats (Howard Chu)
Diffstat (limited to '')
-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;