From 8415581ab299968884037426038fd7624ce081b8 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sat, 20 Sep 2014 13:09:29 -0500 Subject: [PATCH] Actually download in right order. --- alethzero/MainWin.cpp | 2 +- libethereum/DownloadMan.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp index 8d8d4b854..6602cd4cf 100644 --- a/alethzero/MainWin.cpp +++ b/alethzero/MainWin.cpp @@ -98,7 +98,7 @@ Main::Main(QWidget *parent) : }; #if ETH_DEBUG - m_servers.append("localhost:30303"); + m_servers.append("localhost:30300"); #endif m_servers.append(QString::fromStdString(Host::pocHost() + ":30303")); diff --git a/libethereum/DownloadMan.h b/libethereum/DownloadMan.h index 3ca04f0a3..e9cd37e3c 100644 --- a/libethereum/DownloadMan.h +++ b/libethereum/DownloadMan.h @@ -91,8 +91,10 @@ public: for (auto i: m_subs) i->resetFetch(); } - - m_chain = _chain; + m_chain.clear(); + m_chain.reserve(_chain.size()); + for (auto i = _chain.rbegin(); i != _chain.rend(); ++i) + m_chain.push_back(*i); m_blocksGot = RangeMask(0, m_chain.size()); }