aboutsummaryrefslogtreecommitdiffstats
path: root/net.cpp
diff options
context:
space:
mode:
authorsubtly <subtly@users.noreply.github.com>2015-03-23 01:39:56 +0800
committersubtly <subtly@users.noreply.github.com>2015-03-23 01:39:56 +0800
commit3d98932c1ee505fd937e9a56941b5a3d25cd65eb (patch)
treeeb29b73b02a0ee98280e936cf4d77f6f3caf424b /net.cpp
parent96a32d19d52391aa455035bb88ce167e31163df2 (diff)
downloaddexon-solidity-3d98932c1ee505fd937e9a56941b5a3d25cd65eb.tar
dexon-solidity-3d98932c1ee505fd937e9a56941b5a3d25cd65eb.tar.gz
dexon-solidity-3d98932c1ee505fd937e9a56941b5a3d25cd65eb.tar.bz2
dexon-solidity-3d98932c1ee505fd937e9a56941b5a3d25cd65eb.tar.lz
dexon-solidity-3d98932c1ee505fd937e9a56941b5a3d25cd65eb.tar.xz
dexon-solidity-3d98932c1ee505fd937e9a56941b5a3d25cd65eb.tar.zst
dexon-solidity-3d98932c1ee505fd937e9a56941b5a3d25cd65eb.zip
NodeTable constructor requires and listens to explicit IP address instead of defaulting to 0.0.0.0 (all addresses).
Diffstat (limited to 'net.cpp')
-rw-r--r--net.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/net.cpp b/net.cpp
index 3a69a627..e5cca9b6 100644
--- a/net.cpp
+++ b/net.cpp
@@ -53,7 +53,7 @@ protected:
struct TestNodeTable: public NodeTable
{
/// Constructor
- TestNodeTable(ba::io_service& _io, KeyPair _alias, uint16_t _port = 30300): NodeTable(_io, _alias, _port) {}
+ TestNodeTable(ba::io_service& _io, KeyPair _alias, bi::address const& _addr, uint16_t _port = 30300): NodeTable(_io, _alias, _addr, _port) {}
static std::vector<std::pair<KeyPair,unsigned>> createTestNodes(unsigned _count)
{
@@ -106,10 +106,10 @@ struct TestNodeTable: public NodeTable
*/
struct TestNodeTableHost: public TestHost
{
- TestNodeTableHost(unsigned _count = 8): m_alias(KeyPair::create()), nodeTable(new TestNodeTable(m_io, m_alias)), testNodes(TestNodeTable::createTestNodes(_count)) {};
+ TestNodeTableHost(unsigned _count = 8): m_alias(KeyPair::create()), nodeTable(new TestNodeTable(m_io, m_alias, bi::address::from_string("127.0.0.1"))), testNodes(TestNodeTable::createTestNodes(_count)) {};
~TestNodeTableHost() { m_io.stop(); stopWorking(); }
- void setup() { for (auto n: testNodes) nodeTables.push_back(make_shared<TestNodeTable>(m_io,n.first,n.second)); }
+ void setup() { for (auto n: testNodes) nodeTables.push_back(make_shared<TestNodeTable>(m_io,n.first, bi::address::from_string("127.0.0.1"),n.second)); }
void pingAll() { for (auto& t: nodeTables) t->pingTestNodes(testNodes); }