Browse Source

Merge pull request #1462 from ethereum/p2p

Fix for #1366.
cl-refactor
Gav Wood 10 years ago
parent
commit
2b3a4fabc0
  1. 2
      libp2p/Host.h

2
libp2p/Host.h

@ -96,7 +96,7 @@ public:
static std::string pocHost();
/// Register a peer-capability; all new peer connections will have this capability.
template <class T> std::shared_ptr<T> registerCapability(T* _t) { _t->m_host = this; auto ret = std::shared_ptr<T>(_t); m_capabilities[std::make_pair(T::staticName(), T::staticVersion())] = ret; return ret; }
template <class T> std::shared_ptr<T> registerCapability(T* _t) { _t->m_host = this; std::shared_ptr<T> ret(_t); m_capabilities[std::make_pair(T::staticName(), T::staticVersion())] = ret; return ret; }
bool haveCapability(CapDesc const& _name) const { return m_capabilities.count(_name) != 0; }
CapDescs caps() const { CapDescs ret; for (auto const& i: m_capabilities) ret.push_back(i.first); return ret; }

Loading…
Cancel
Save