Browse Source

Log "version" message IP addresses in client connect summary

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>
0.10
Jeff Garzik 10 years ago committed by Wladimir J. van der Laan
parent
commit
70b9d36a2c
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 9
      src/main.cpp

9
src/main.cpp

@ -3628,7 +3628,14 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
pfrom->fSuccessfullyConnected = true; 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); AddTimeData(pfrom->addr, nTime);
} }

Loading…
Cancel
Save