From 97a1d905571facae72d37d8a53d4a117784b9cd1 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Tue, 18 Aug 2015 14:45:34 +0200 Subject: [PATCH] Add gav.ethdev.com as a node. --- alethzero/MainWin.cpp | 6 ++---- libp2p/Host.cpp | 8 +------- libp2p/Host.h | 4 +--- third/MainWin.cpp | 2 +- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp index 995553803..e05d296e6 100644 --- a/alethzero/MainWin.cpp +++ b/alethzero/MainWin.cpp @@ -158,10 +158,8 @@ Main::Main(QWidget* _parent): m_keyManager.import(ICAP::createDirect(), "Default identity"); } -#if ETH_DEBUG - m_servers.append("127.0.0.1:30300"); -#endif - m_servers.append(QString::fromStdString(Host::pocHost() + ":30303")); + for (auto const& i: Host::pocHosts()) + m_servers.append(QString::fromStdString("enode://" + i.first.hex() + "@" + i.second)); if (!dev::contents(dbPath + "/genesis.json").empty()) CanonBlockChain::setGenesis(contentsString(dbPath + "/genesis.json")); diff --git a/libp2p/Host.cpp b/libp2p/Host.cpp index 2356e10be..f62a66865 100644 --- a/libp2p/Host.cpp +++ b/libp2p/Host.cpp @@ -439,16 +439,10 @@ void Host::runAcceptor() } } -string Host::pocHost() -{ - vector strs; - boost::split(strs, dev::Version, boost::is_any_of(".")); - return "poc-" + strs[1] + ".ethdev.com"; -} - std::unordered_map const& Host::pocHosts() { static const std::unordered_map c_ret = { + { Public("5374c1bff8df923d3706357eeb4983cd29a63be40a269aaa2296ee5f3b2119a8978c0ed68b8f6fc84aad0df18790417daadf91a4bfbb786a16c9b0a199fa254a"), "gav.ethdev.com:30300" }, { Public("979b7fa28feeb35a4741660a16076f1943202cb72b6af70d327f053e248bab9ba81760f39d0701ef1d8f89cc1fbd2cacba0710a12cd5314d5e0c9021aa3637f9"), "poc-9.ethdev.com:30303" }, { Public("a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c"), "52.16.188.185:30303" }, { Public("7f25d3eab333a6b98a8b5ed68d962bb22c876ffcd5561fca54e3c2ef27f754df6f7fd7c9b74cc919067abac154fb8e1f8385505954f161ae440abc355855e034"), "54.207.93.166:30303" } diff --git a/libp2p/Host.h b/libp2p/Host.h index b9341728a..a13705927 100644 --- a/libp2p/Host.h +++ b/libp2p/Host.h @@ -145,9 +145,7 @@ public: /// Will block on network process events. virtual ~Host(); - /// Default host for current version of client. - static std::string pocHost(); - + /// Default hosts for current version of client. static std::unordered_map const& pocHosts(); /// Register a peer-capability; all new peer connections will have this capability. diff --git a/third/MainWin.cpp b/third/MainWin.cpp index 33186e4bc..1d8abbfef 100644 --- a/third/MainWin.cpp +++ b/third/MainWin.cpp @@ -119,7 +119,7 @@ Main::Main(QWidget *parent) : bytesConstRef networkConfig((byte*)m_networkConfig.data(), m_networkConfig.size()); m_web3.reset(new WebThreeDirect("Third", getDataDir() + "/Third", false, {"eth", "shh"}, NetworkPreferences(), networkConfig)); - m_web3->connect(Host::pocHost()); +// m_web3->connect(Host::pocHost()); m_httpConnector.reset(new jsonrpc::HttpServer(8080)); m_server.reset(new WebThreeStubServer(*m_httpConnector, *web3(), keysAsVector(m_myKeys)));