Browse Source

fix typo

cl-refactor
subtly 10 years ago
parent
commit
7492c9c833
  1. 4
      libp2p/NodeTable.cpp
  2. 2
      libp2p/NodeTable.h

4
libp2p/NodeTable.cpp

@ -178,7 +178,7 @@ void NodeTable::discover(NodeId _node, unsigned _round, shared_ptr<set<shared_pt
tried.push_back(r);
FindNode p(r->endpoint.udp, _node);
p.sign(m_secret);
m_findNodeTimout.push_back(make_pair(_node, chrono::steady_clock::now()));
m_findNodeTimeout.push_back(make_pair(_node, chrono::steady_clock::now()));
m_socketPointer->send(p);
}
@ -459,7 +459,7 @@ void NodeTable::onReceived(UDPSocketFace*, bi::udp::endpoint const& _from, bytes
case Neighbours::type:
{
bool expected = false;
m_findNodeTimout.remove_if([&](NodeIdTimePoint const& t)
m_findNodeTimeout.remove_if([&](NodeIdTimePoint const& t)
{
if (t.first == nodeid && chrono::steady_clock::now() - t.second < c_reqTimeout)
expected = true;

2
libp2p/NodeTable.h

@ -273,7 +273,7 @@ private:
std::map<bi::address, TimePoint> m_pubkDiscoverPings; ///< List of pending pings where node entry wasn't created due to unkown pubk.
Mutex x_findNodeTimeout;
std::list<NodeIdTimePoint> m_findNodeTimout; ///< Timeouts for pending Ping and FindNode requests.
std::list<NodeIdTimePoint> m_findNodeTimeout; ///< Timeouts for pending Ping and FindNode requests.
ba::io_service& m_io; ///< Used by bucket refresh timer.
std::shared_ptr<NodeSocket> m_socket; ///< Shared pointer for our UDPSocket; ASIO requires shared_ptr.

Loading…
Cancel
Save