daemon: sort alt chains by height

This commit is contained in:
moneromooo-monero
2019-05-02 22:23:00 +00:00
parent c0bc6d96cd
commit 0605406714
5 changed files with 9 additions and 7 deletions

View File

@@ -1991,7 +1991,7 @@ namespace cryptonote
PERF_TIMER(on_get_alternate_chains);
try
{
std::list<std::pair<Blockchain::block_extended_info, std::vector<crypto::hash>>> chains = m_core.get_blockchain_storage().get_alternative_chains();
std::vector<std::pair<Blockchain::block_extended_info, std::vector<crypto::hash>>> chains = m_core.get_blockchain_storage().get_alternative_chains();
for (const auto &i: chains)
{
difficulty_type wdiff = i.first.cumulative_difficulty;