mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
update whisper test. move ports out of private ranges and specify ip address.
This commit is contained in:
parent
64ea4a1959
commit
cc9a7cbb71
@ -36,15 +36,16 @@ BOOST_AUTO_TEST_CASE(topic)
|
|||||||
auto oldLogVerbosity = g_logVerbosity;
|
auto oldLogVerbosity = g_logVerbosity;
|
||||||
g_logVerbosity = 0;
|
g_logVerbosity = 0;
|
||||||
|
|
||||||
|
Host ph1("Test", NetworkPreferences(30303, "127.0.0.1", true, true));
|
||||||
|
|
||||||
bool started = false;
|
bool started = false;
|
||||||
unsigned result = 0;
|
unsigned result = 0;
|
||||||
std::thread listener([&]()
|
std::thread listener([&]()
|
||||||
{
|
{
|
||||||
setThreadName("other");
|
setThreadName("other");
|
||||||
|
|
||||||
Host ph("Test", NetworkPreferences(50303, "", false, true));
|
auto wh = ph1.registerCapability(new WhisperHost());
|
||||||
auto wh = ph.registerCapability(new WhisperHost());
|
ph1.start();
|
||||||
ph.start();
|
|
||||||
|
|
||||||
started = true;
|
started = true;
|
||||||
|
|
||||||
@ -67,12 +68,12 @@ BOOST_AUTO_TEST_CASE(topic)
|
|||||||
while (!started)
|
while (!started)
|
||||||
this_thread::sleep_for(chrono::milliseconds(50));
|
this_thread::sleep_for(chrono::milliseconds(50));
|
||||||
|
|
||||||
Host ph("Test", NetworkPreferences(50300, "", false, true));
|
Host ph("Test", NetworkPreferences(30300, "127.0.0.1", true, true));
|
||||||
auto wh = ph.registerCapability(new WhisperHost());
|
auto wh = ph.registerCapability(new WhisperHost());
|
||||||
this_thread::sleep_for(chrono::milliseconds(500));
|
this_thread::sleep_for(chrono::milliseconds(500));
|
||||||
ph.start();
|
ph.start();
|
||||||
this_thread::sleep_for(chrono::milliseconds(500));
|
this_thread::sleep_for(chrono::milliseconds(500));
|
||||||
ph.addNode(NodeId(), "127.0.0.1", 50303, 50303);
|
ph.addNode(ph1.id(), "127.0.0.1", 30303, 30303);
|
||||||
|
|
||||||
KeyPair us = KeyPair::create();
|
KeyPair us = KeyPair::create();
|
||||||
for (int i = 0; i < 10; ++i)
|
for (int i = 0; i < 10; ++i)
|
||||||
|
Loading…
Reference in New Issue
Block a user