@ -94,8 +94,11 @@ unsigned WhisperHost::installWatch(shh::Topics const& _t)
DEV_GUARDED(m_filterLock)
{
if (!m_filters.count(h))
auto it = m_filters.find(h);
if (m_filters.end() == it)
m_filters.insert(make_pair(h, f));
else
it->second.refCount++;
ret = m_watches.size() ? m_watches.rbegin()->first + 1 : 0;
m_watches[ret] = ClientWatch(h);
@ -58,7 +58,10 @@ bool WhisperPeer::interpret(unsigned _id, RLP const& _r)
disable("Invalid protocol version.");
for (auto const& m: host()->all())
Guard l(x_unseen);
m_unseen.insert(make_pair(0, m.first));
}
if (session()->id() < host()->host()->id())
sendMessages();