From f070de2047843f31d8bbedaa9b992a0667276c2c Mon Sep 17 00:00:00 2001 From: subtly Date: Thu, 12 Feb 2015 00:00:05 -0500 Subject: [PATCH] load network before constructing webthreedirect --- alethzero/MainWin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp index f3714e76e..1d4427789 100644 --- a/alethzero/MainWin.cpp +++ b/alethzero/MainWin.cpp @@ -162,6 +162,8 @@ Main::Main(QWidget *parent) : connect(ui->ourAccounts->model(), SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)), SLOT(ourAccountsRowsMoved())); + QSettings s("ethereum", "alethzero"); + m_networkConfig = s.value("peers").toByteArray(); bytesConstRef network((byte*)m_networkConfig.data(), m_networkConfig.size()); m_webThree.reset(new WebThreeDirect(string("AlethZero/v") + dev::Version + "/" DEV_QUOTED(ETH_BUILD_TYPE) "/" DEV_QUOTED(ETH_BUILD_PLATFORM), getDataDir() + "/AlethZero", false, {"eth", "shh"}, p2p::NetworkPreferences(), network)); @@ -715,7 +717,6 @@ void Main::readSettings(bool _skipGeometry) } } - m_networkConfig = s.value("peers").toByteArray(); ui->upnp->setChecked(s.value("upnp", true).toBool()); ui->forceAddress->setText(s.value("forceAddress", "").toString()); ui->usePast->setChecked(s.value("usePast", true).toBool());