mirror of
https://github.com/monero-project/monero.git
synced 2025-08-06 07:14:20 -04:00
Merge pull request #2237
5d4ef719
core: speed up output index unique set calculation (moneromooo-monero)19d7f568
perf_timer: allow profiling more granular than millisecond (moneromooo-monero)bda8c598
epee: add nanosecond timer and pause/restart profiling macros (moneromooo-monero)
This commit is contained in:
commit
1cf4665d2a
4 changed files with 34 additions and 19 deletions
|
@ -3883,17 +3883,17 @@ bool Blockchain::prepare_handle_incoming_blocks(const std::list<block_complete_e
|
|||
offset_map[in_to_key.amount].push_back(offset);
|
||||
|
||||
}
|
||||
|
||||
// sort and remove duplicate absolute_offsets in offset_map
|
||||
for (auto &offsets : offset_map)
|
||||
{
|
||||
std::sort(offsets.second.begin(), offsets.second.end());
|
||||
auto last = std::unique(offsets.second.begin(), offsets.second.end());
|
||||
offsets.second.erase(last, offsets.second.end());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// sort and remove duplicate absolute_offsets in offset_map
|
||||
for (auto &offsets : offset_map)
|
||||
{
|
||||
std::sort(offsets.second.begin(), offsets.second.end());
|
||||
auto last = std::unique(offsets.second.begin(), offsets.second.end());
|
||||
offsets.second.erase(last, offsets.second.end());
|
||||
}
|
||||
|
||||
// [output] stores all transactions for each tx_out_index::hash found
|
||||
std::vector<std::unordered_map<crypto::hash, cryptonote::transaction>> transactions(amounts.size());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue