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.
|
// Switch to the new protocol version.
|
||||||
int peerVersion = vPeerVersionMessage.clientVersion;
|
int peerVersion = vPeerVersionMessage.clientVersion;
|
||||||
PeerAddress peerAddress = getAddress();
|
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(),
|
peerAddress == null ? "Peer" : peerAddress.getAddr().getHostAddress(),
|
||||||
peerVersion,
|
peerVersion,
|
||||||
vPeerVersionMessage.subVer,
|
vPeerVersionMessage.subVer,
|
||||||
vPeerVersionMessage.localServices,
|
vPeerVersionMessage.localServices,
|
||||||
new Date(vPeerVersionMessage.time * 1000),
|
String.format("%tF %tT", peerTime, peerTime),
|
||||||
vPeerVersionMessage.bestHeight
|
vPeerVersionMessage.bestHeight);
|
||||||
});
|
|
||||||
// Now it's our turn ...
|
// Now it's our turn ...
|
||||||
// Send an ACK message stating we accept the peers protocol version.
|
// Send an ACK message stating we accept the peers protocol version.
|
||||||
sendMessage(new VersionAck());
|
sendMessage(new VersionAck());
|
||||||
|
Loading…
Reference in New Issue
Block a user