diff options
author | subtly <subtly@users.noreply.github.com> | 2015-02-07 03:54:00 +0800 |
---|---|---|
committer | subtly <subtly@users.noreply.github.com> | 2015-02-07 03:54:00 +0800 |
commit | 1ff43014095ce6d3b3863211e93c55145cbf7a11 (patch) | |
tree | 2683f3770f3af659efd1b6cff3cbccd8be1802cc /net.cpp | |
parent | c44376d1f9d97aabcc54f0fe791994f0d3e518f2 (diff) | |
download | dexon-solidity-1ff43014095ce6d3b3863211e93c55145cbf7a11.tar dexon-solidity-1ff43014095ce6d3b3863211e93c55145cbf7a11.tar.gz dexon-solidity-1ff43014095ce6d3b3863211e93c55145cbf7a11.tar.bz2 dexon-solidity-1ff43014095ce6d3b3863211e93c55145cbf7a11.tar.lz dexon-solidity-1ff43014095ce6d3b3863211e93c55145cbf7a11.tar.xz dexon-solidity-1ff43014095ce6d3b3863211e93c55145cbf7a11.tar.zst dexon-solidity-1ff43014095ce6d3b3863211e93c55145cbf7a11.zip |
updates for code-review
Diffstat (limited to 'net.cpp')
-rw-r--r-- | net.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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(); |