mirror of
https://github.com/monero-project/monero.git
synced 2025-08-10 02:40:10 -04:00
Merge pull request #6661
267ce5b71
avoid a couple needless copies (moneromooo-monero)
This commit is contained in:
commit
bc48494731
2 changed files with 2 additions and 2 deletions
|
@ -1301,7 +1301,7 @@ difficulty_type Blockchain::get_next_difficulty_for_alternative_chain(const std:
|
|||
size_t count = 0;
|
||||
size_t max_i = timestamps.size()-1;
|
||||
// get difficulties and timestamps from most recent blocks in alt chain
|
||||
for (const auto bei: boost::adaptors::reverse(alt_chain))
|
||||
for (const auto &bei: boost::adaptors::reverse(alt_chain))
|
||||
{
|
||||
timestamps[max_i - count] = bei.bl.timestamp;
|
||||
cumulative_difficulties[max_i - count] = bei.cumulative_difficulty;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue