Better logging of time offsets on connection.

This commit is contained in:
JoelKatz
2012-09-03 05:16:08 -07:00
parent 81793192cb
commit 8eb33f6bb5

View File

@@ -586,7 +586,10 @@ void Peer::recvHello(newcoin::TMHello& packet)
if (packet.has_nettime() && ((packet.nettime() < minTime) || (packet.nettime() > maxTime)))
{
Log(lsINFO) << "Recv(Hello): Disconnect: Clock is far off";
if (packet.nettime() > maxTime)
Log(lsINFO) << "Recv(Hello): Disconnect: Clock is far off +" << packet.nettime() - ourTime;
else if(packet.nettime() < minTime)
Log(lsINFO) << "Recv(Hello): Disconnect: Clock is far off -" << ourTime - packet.nettime();
}
else if (packet.protoversionmin() < MAKE_VERSION_INT(MIN_PROTO_MAJOR, MIN_PROTO_MINOR))
{