Browse Source

VS fix.

cl-refactor
Gav Wood 11 years ago
parent
commit
7507f95203
  1. 5
      alethzero/MainWin.cpp
  2. 1
      libp2p/Common.h
  3. 2
      libp2p/Session.cpp

5
alethzero/MainWin.cpp

@ -691,7 +691,7 @@ void Main::refreshNetwork()
ui->peerCount->setText(QString::fromStdString(toString(ps.size())) + " peer(s)");
ui->peers->clear();
for (PeerInfo const& i: ps)
ui->peers->addItem(QString("%3 ms - %1:%2 - %4").arg(i.host.c_str()).arg(i.port).arg(chrono::duration_cast<chrono::milliseconds>(i.lastPing).count()).arg(i.clientVersion.c_str()));
ui->peers->addItem(QString("%3 ms - %1:%2 - %4 %5").arg(i.host.c_str()).arg(i.port).arg(chrono::duration_cast<chrono::milliseconds>(i.lastPing).count()).arg(i.clientVersion.c_str()).arg(QString::fromStdString(toString(i.caps))));
}
void Main::refreshAll()
@ -1906,4 +1906,7 @@ void Main::updateDebugger()
#include\
"moc_MiningView.cpp"
#include\
"moc_DownloadView.cpp"
#endif

1
libp2p/Common.h

@ -94,6 +94,7 @@ struct PeerInfo
std::string host;
unsigned short port;
std::chrono::steady_clock::duration lastPing;
std::set<std::string> caps;
};
}

2
libp2p/Session.cpp

@ -102,7 +102,7 @@ bool Session::interpret(RLP const& _r)
return false;
}
try
{ m_info = PeerInfo({clientVersion, m_socket.remote_endpoint().address().to_string(), m_listenPort, std::chrono::steady_clock::duration()}); }
{ m_info = PeerInfo({clientVersion, m_socket.remote_endpoint().address().to_string(), m_listenPort, std::chrono::steady_clock::duration(), _r[3].toSet<string>()}); }
catch (...)
{
disconnect(BadProtocol);

Loading…
Cancel
Save