|
|
@ -947,14 +947,14 @@ int main(int argc, char** argv) |
|
|
|
|
|
|
|
// Peers
|
|
|
|
y = 1; |
|
|
|
string psc; |
|
|
|
string pss; |
|
|
|
auto cp = c.peers(); |
|
|
|
psc = toString(cp.size()) + " peer(s)"; |
|
|
|
for (PeerInfo const& i: cp) |
|
|
|
for (PeerInfo const& i: c.peers()) |
|
|
|
{ |
|
|
|
pss = toString(chrono::duration_cast<chrono::milliseconds>(i.lastPing).count()) + " ms - " + i.host + ":" + toString(i.port) + " - " + i.clientVersion; |
|
|
|
mvwaddnstr(peerswin, y++, x, pss.c_str(), qwidth); |
|
|
|
auto s = boost::format("%1% ms - %2%:%3% - %4%") % |
|
|
|
toString(chrono::duration_cast<chrono::milliseconds>(i.lastPing).count()) % |
|
|
|
i.host % |
|
|
|
toString(i.port) % |
|
|
|
i.clientVersion; |
|
|
|
mvwaddnstr(peerswin, y++, x, s.str().c_str(), qwidth); |
|
|
|
if (y > height * 2 / 5 - 4) |
|
|
|
break; |
|
|
|
} |
|
|
|