Browse Source

UX fixes to nodes view.

cl-refactor
Gav Wood 10 years ago
parent
commit
a775c54adf
  1. 7
      alethzero/MainWin.cpp
  2. 1
      libp2p/Host.cpp

7
alethzero/MainWin.cpp

@ -767,14 +767,13 @@ void Main::refreshNetwork()
ui->nodes->clear(); ui->nodes->clear();
for (p2p::Node const& i: ns) for (p2p::Node const& i: ns)
if (!i.dead) if (!i.dead)
ui->nodes->addItem(QString("[%1%3] %2 - ( =%5s | /%4s | %6 | %7x ) - *%8 $%9") ui->nodes->addItem(QString("[%1%3] %2 - ( =%5s | /%4s%6 ) - *%7 $%8")
.arg(QString::fromStdString(i.id.abridged())) .arg(QString::fromStdString(i.id.abridged()))
.arg(QString::fromStdString(toString(i.address))) .arg(QString::fromStdString(toString(i.address)))
.arg(i.id == web3()->id() ? " self" : i.isOffline() ? " ripe" : " ----") .arg(i.id == web3()->id() ? " self" : i.isOffline() ? QString::number(i.fallbackSeconds() - i.secondsSinceLastAttempted()) + "s" : " ----")
.arg(i.secondsSinceLastAttempted()) .arg(i.secondsSinceLastAttempted())
.arg(i.secondsSinceLastConnected()) .arg(i.secondsSinceLastConnected())
.arg(QString::fromStdString(reasonOf(i.lastDisconnect))) .arg(i.lastDisconnect == NoDisconnect ? QString("") : (" | " + QString::fromStdString(reasonOf(i.lastDisconnect)) + " | " + QString::number(i.failedAttempts) + "x"))
.arg(i.failedAttempts)
.arg(i.rating) .arg(i.rating)
.arg((int)i.idOrigin) .arg((int)i.idOrigin)
); );

1
libp2p/Host.cpp

@ -507,6 +507,7 @@ void Node::connect(Host* _h)
{ {
clog(NetConnect) << "Connection refused to node" << id.abridged() << "@" << address << "(" << ec.message() << ")"; clog(NetConnect) << "Connection refused to node" << id.abridged() << "@" << address << "(" << ec.message() << ")";
lastDisconnect = TCPError; lastDisconnect = TCPError;
lastAttempted = std::chrono::system_clock::now();
_h->m_ready += index; _h->m_ready += index;
} }
else else

Loading…
Cancel
Save