mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
New net is compiling.
This commit is contained in:
parent
42920f5d93
commit
dbf099d121
11
peer.cpp
11
peer.cpp
@ -22,9 +22,7 @@
|
|||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <boost/filesystem/operations.hpp>
|
#include <libethnet/PeerHost.h>
|
||||||
#include <libethereum/BlockChain.h>
|
|
||||||
#include <libethereum/EthereumHost.h>
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace eth;
|
using namespace eth;
|
||||||
using boost::asio::ip::tcp;
|
using boost::asio::ip::tcp;
|
||||||
@ -48,18 +46,17 @@ int peerTest(int argc, char** argv)
|
|||||||
remoteHost = argv[i];
|
remoteHost = argv[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockChain ch(boost::filesystem::temp_directory_path().string());
|
PeerHost ph("Test", listenPort);
|
||||||
EthereumHost pn("Test", ch, 0, listenPort);
|
|
||||||
|
|
||||||
if (!remoteHost.empty())
|
if (!remoteHost.empty())
|
||||||
pn.connect(remoteHost, remotePort);
|
ph.connect(remoteHost, remotePort);
|
||||||
|
|
||||||
for (int i = 0; ; ++i)
|
for (int i = 0; ; ++i)
|
||||||
{
|
{
|
||||||
this_thread::sleep_for(chrono::milliseconds(100));
|
this_thread::sleep_for(chrono::milliseconds(100));
|
||||||
// pn.sync();
|
// pn.sync();
|
||||||
if (!(i % 10))
|
if (!(i % 10))
|
||||||
pn.pingAll();
|
ph.pingAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user