aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorR E Broadley <rebroad+github@gmail.com>2014-02-26 17:55:04 -0800
committerR E Broadley <rebroad+github@gmail.com>2014-07-04 09:38:44 +0700
commit2e36866fecb7420cd73047a7aa762a6e5e225695 (patch)
tree8722a5d841711574d6cd1b3106fa2e67935fbd85 /src/net.h
parentf04f1234078288d4806aaab0952d60f137337e81 (diff)
Show nodeid instead of addresses (for anonymity) unless otherwise requested.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/net.h b/src/net.h
index 2ee798d468..3b169f442f 100644
--- a/src/net.h
+++ b/src/net.h
@@ -330,6 +330,11 @@ public:
id = nLastNodeId++;
}
+ if (fLogIPs)
+ LogPrint("net", "Added connection to %s peer=%d\n", addrName, id);
+ else
+ LogPrint("net", "Added connection peer=%d\n", id);
+
// Be shy and don't send version until we hear
if (hSocket != INVALID_SOCKET && !fInbound)
PushVersion();
@@ -446,7 +451,7 @@ public:
nRequestTime = it->second;
else
nRequestTime = 0;
- LogPrint("net", "askfor %s %d (%s)\n", inv.ToString(), nRequestTime, DateTimeStrFormat("%H:%M:%S", nRequestTime/1000000).c_str());
+ LogPrint("net", "askfor %s %d (%s) peer=%d\n", inv.ToString(), nRequestTime, DateTimeStrFormat("%H:%M:%S", nRequestTime/1000000).c_str(), id);
// Make sure not to reuse time indexes to keep things in the same order
int64_t nNow = GetTimeMicros() - 1000000;
@@ -514,7 +519,7 @@ public:
assert(ssSend.size () >= CMessageHeader::CHECKSUM_OFFSET + sizeof(nChecksum));
memcpy((char*)&ssSend[CMessageHeader::CHECKSUM_OFFSET], &nChecksum, sizeof(nChecksum));
- LogPrint("net", "(%d bytes)\n", nSize);
+ LogPrint("net", "(%d bytes) peer=%d\n", nSize, id);
std::deque<CSerializeData>::iterator it = vSendMsg.insert(vSendMsg.end(), CSerializeData());
ssSend.GetAndClear(*it);