aboutsummaryrefslogtreecommitdiffstats
path: root/net.cpp
diff options
context:
space:
mode:
authorsubtly <subtly@users.noreply.github.com>2015-02-07 03:54:00 +0800
committersubtly <subtly@users.noreply.github.com>2015-02-07 03:54:00 +0800
commit1ff43014095ce6d3b3863211e93c55145cbf7a11 (patch)
tree2683f3770f3af659efd1b6cff3cbccd8be1802cc /net.cpp
parentc44376d1f9d97aabcc54f0fe791994f0d3e518f2 (diff)
downloaddexon-solidity-1ff43014095ce6d3b3863211e93c55145cbf7a11.tar.gz
dexon-solidity-1ff43014095ce6d3b3863211e93c55145cbf7a11.tar.zst
dexon-solidity-1ff43014095ce6d3b3863211e93c55145cbf7a11.zip
updates for code-review
Diffstat (limited to 'net.cpp')
-rw-r--r--net.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/net.cpp b/net.cpp
index 7f30ed03..5a7e56d2 100644
--- a/net.cpp
+++ b/net.cpp
@@ -87,7 +87,7 @@ struct TestNodeTable: public NodeTable
bi::address ourIp = bi::address::from_string("127.0.0.1");
for (auto& n: _testNodes)
if (_count--)
- noteNode(n.first.pub(), bi::udp::endpoint(ourIp, n.second));
+ noteActiveNode(n.first.pub(), bi::udp::endpoint(ourIp, n.second));
else
break;
}
@@ -182,7 +182,7 @@ BOOST_AUTO_TEST_CASE(kademlia)
// Not yet a 'real' test.
TestNodeTableHost node(8);
node.start();
- node.nodeTable->join(); // ideally, joining with empty node table logs warning we can check for
+ node.nodeTable->discover(); // ideally, joining with empty node table logs warning we can check for
node.setup();
node.populate();
clog << "NodeTable:\n" << *node.nodeTable.get() << endl;
@@ -199,11 +199,11 @@ BOOST_AUTO_TEST_CASE(kademlia)
node.populate(1);
clog << "NodeTable:\n" << *node.nodeTable.get() << endl;
- node.nodeTable->join();
+ node.nodeTable->discover();
this_thread::sleep_for(chrono::milliseconds(2000));
clog << "NodeTable:\n" << *node.nodeTable.get() << endl;
- BOOST_REQUIRE_EQUAL(node.nodeTable->size(), 8);
+ BOOST_REQUIRE_EQUAL(node.nodeTable->count(), 8);
auto netNodes = node.nodeTable->nodes();
netNodes.sort();