diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-09-21 20:31:21 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-09-21 20:31:21 +0200 |
commit | d6893aedf6ef39e2c5d72e8ec98210f6350b8a5b (patch) | |
tree | fe966f820568320f2da8c891c756086a54326a7a /src/cryptonote_core/blockchain.cpp | |
parent | Merge pull request #4266 (diff) | |
parent | blockchain: simplify output distribution code (diff) | |
download | monero-d6893aedf6ef39e2c5d72e8ec98210f6350b8a5b.tar.xz |
Merge pull request #4369
b2bb9312 blockchain: simplify output distribution code (moneromooo-monero)
befdcbf4 db_lmdb: do not use base for cumulative distribution (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 3751d6473..0dc3f3bb4 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -1818,15 +1818,10 @@ bool Blockchain::get_output_distribution(uint64_t amount, uint64_t from_height, { std::vector<uint64_t> heights; heights.reserve(to_height + 1 - start_height); - uint64_t real_start_height = start_height > 0 ? start_height-1 : start_height; - for (uint64_t h = real_start_height; h <= to_height; ++h) + for (uint64_t h = start_height; h <= to_height; ++h) heights.push_back(h); distribution = m_db->get_block_cumulative_rct_outputs(heights); - if (start_height > 0) - { - base = distribution[0]; - distribution.erase(distribution.begin()); - } + base = 0; return true; } else |