mirror of
https://github.com/monero-project/monero.git
synced 2024-11-18 00:37:43 +00:00
Revert "blockchain: simplify output distribution code"
This reverts commit b2bb9312a7
.
This commit is contained in:
parent
d850e05b53
commit
872c7eb26a
1 changed files with 7 additions and 2 deletions
|
@ -1831,10 +1831,15 @@ bool Blockchain::get_output_distribution(uint64_t amount, uint64_t from_height,
|
|||
{
|
||||
std::vector<uint64_t> heights;
|
||||
heights.reserve(to_height + 1 - start_height);
|
||||
for (uint64_t h = start_height; h <= to_height; ++h)
|
||||
uint64_t real_start_height = start_height > 0 ? start_height-1 : start_height;
|
||||
for (uint64_t h = real_start_height; h <= to_height; ++h)
|
||||
heights.push_back(h);
|
||||
distribution = m_db->get_block_cumulative_rct_outputs(heights);
|
||||
base = 0;
|
||||
if (start_height > 0)
|
||||
{
|
||||
base = distribution[0];
|
||||
distribution.erase(distribution.begin());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue