mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-31 15:22:16 +00:00
Print peer times using String.format. Resolves issue 495.
This commit is contained in:
parent
2f8740f8a8
commit
22a58755db
@ -368,14 +368,14 @@ public class Peer extends PeerSocketHandler {
|
||||
// Switch to the new protocol version.
|
||||
int peerVersion = vPeerVersionMessage.clientVersion;
|
||||
PeerAddress peerAddress = getAddress();
|
||||
log.info("Connected to {}: version={}, subVer='{}', services=0x{}, time={}, blocks={}", new Object[] {
|
||||
long peerTime = vPeerVersionMessage.time * 1000;
|
||||
log.info("Connected to {}: version={}, subVer='{}', services=0x{}, time={}, blocks={}",
|
||||
peerAddress == null ? "Peer" : peerAddress.getAddr().getHostAddress(),
|
||||
peerVersion,
|
||||
vPeerVersionMessage.subVer,
|
||||
vPeerVersionMessage.localServices,
|
||||
new Date(vPeerVersionMessage.time * 1000),
|
||||
vPeerVersionMessage.bestHeight
|
||||
});
|
||||
vPeerVersionMessage.subVer,
|
||||
vPeerVersionMessage.localServices,
|
||||
String.format("%tF %tT", peerTime, peerTime),
|
||||
vPeerVersionMessage.bestHeight);
|
||||
// Now it's our turn ...
|
||||
// Send an ACK message stating we accept the peers protocol version.
|
||||
sendMessage(new VersionAck());
|
||||
|
Loading…
Reference in New Issue
Block a user