aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-09-12 19:18:26 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-09-12 19:20:13 +0000
commitbefdcbf4bef3a418a5fcd035b55dbadab2951d4b (patch)
tree5d4b561f0926a1c68a33adb37b74d5950f347c7a /src/blockchain_db
parentMerge pull request #4219 (diff)
downloadmonero-befdcbf4bef3a418a5fcd035b55dbadab2951d4b.tar.xz
db_lmdb: do not use base for cumulative distribution
it's confusing and needlessly complicated
Diffstat (limited to 'src/blockchain_db')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index 9e22e2e4b..b0f3ca5f0 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -3391,8 +3391,10 @@ bool BlockchainLMDB::get_output_distribution(uint64_t amount, uint64_t from_heig
break;
}
+ distribution[0] += base;
for (size_t n = 1; n < distribution.size(); ++n)
distribution[n] += distribution[n - 1];
+ base = 0;
TXN_POSTFIX_RDONLY();