Skip to content

Commit

Permalink
Log "version" message IP addresses in client connect summary
Browse files Browse the repository at this point in the history
The only other method of logging remote addresses is via

     -logips=1 -debug=net

which increases the logged activity by 100x or more.

Github-Pull: #4608
Amended-By: Wladimir J. van der Laan <laanwj@gmail.com>
  • Loading branch information
Jeff Garzik authored and laanwj committed Aug 4, 2014
1 parent ab676c3 commit 70b9d36
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3628,7 +3628,14 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,

pfrom->fSuccessfullyConnected = true;

LogPrintf("receive version message: %s: version %d, blocks=%d, us=%s, peer=%d\n", pfrom->cleanSubVer, pfrom->nVersion, pfrom->nStartingHeight, addrMe.ToString(), pfrom->id);
string remoteAddr;
if (fLogIPs)
remoteAddr = ", peeraddr=" + pfrom->addr.ToString();

LogPrintf("receive version message: %s: version %d, blocks=%d, us=%s, peer=%d%s\n",
pfrom->cleanSubVer, pfrom->nVersion,
pfrom->nStartingHeight, addrMe.ToString(), pfrom->id,
remoteAddr);

AddTimeData(pfrom->addr, nTime);
}
Expand Down

0 comments on commit 70b9d36

Please sign in to comment.