From 7507f95203d201270fabf55a5568d26f8183f03c Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 21 Sep 2014 08:23:13 -0500 Subject: [PATCH] VS fix. --- alethzero/MainWin.cpp | 5 ++++- libp2p/Common.h | 1 + libp2p/Session.cpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp index 087b3eae8..b4bbb8ca7 100644 --- a/alethzero/MainWin.cpp +++ b/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(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(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 diff --git a/libp2p/Common.h b/libp2p/Common.h index 8035f462f..a83ac03de 100644 --- a/libp2p/Common.h +++ b/libp2p/Common.h @@ -94,6 +94,7 @@ struct PeerInfo std::string host; unsigned short port; std::chrono::steady_clock::duration lastPing; + std::set caps; }; } diff --git a/libp2p/Session.cpp b/libp2p/Session.cpp index 252a1e8e6..2dc60e0de 100644 --- a/libp2p/Session.cpp +++ b/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()}); } catch (...) { disconnect(BadProtocol);