Browse Source

neth: format peers

cl-refactor
caktux 10 years ago
parent
commit
cbcff4953f
  1. 14
      neth/main.cpp

14
neth/main.cpp

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

Loading…
Cancel
Save