|
|
@ -97,25 +97,9 @@ Main::Main(QWidget *parent) : |
|
|
|
// ui->log->addItem(QString::fromStdString(s));
|
|
|
|
}; |
|
|
|
|
|
|
|
#if 0&Ð_DEBUG
|
|
|
|
m_servers.append("192.168.0.10:30301"); |
|
|
|
#else |
|
|
|
int pocnumber = QString(dev::Version).section('.', 1, 1).toInt(); |
|
|
|
if (pocnumber == 5) |
|
|
|
m_servers.push_back("54.72.69.180:30303"); |
|
|
|
else if (pocnumber == 6) |
|
|
|
m_servers.push_back("54.76.56.74:30303"); |
|
|
|
else |
|
|
|
{ |
|
|
|
connect(&m_webCtrl, &QNetworkAccessManager::finished, [&](QNetworkReply* _r) |
|
|
|
{ |
|
|
|
m_servers = QString::fromUtf8(_r->readAll()).split("\n", QString::SkipEmptyParts); |
|
|
|
}); |
|
|
|
QNetworkRequest r(QUrl("http://www.ethereum.org/servers.poc" + QString::number(pocnumber) + ".txt")); |
|
|
|
r.setHeader(QNetworkRequest::UserAgentHeader, "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1712.0 Safari/537.36"); |
|
|
|
m_webCtrl.get(r); |
|
|
|
srand(time(0)); |
|
|
|
} |
|
|
|
m_servers.append(QString::fromStdString(Host::pocHost() + ":30303")); |
|
|
|
#if ETH_DEBUG |
|
|
|
m_servers.append("localhost:30303"); |
|
|
|
#endif |
|
|
|
|
|
|
|
cerr << "State root: " << BlockChain::genesis().stateRoot << endl; |
|
|
|