PPCoin: RPC command 'getinfo' shows ip address seen by peer
[novacoin.git] / src / main.cpp
index 9d9020c..60d0704 100644 (file)
@@ -1976,6 +1976,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
             return true;
         }
 
+        // ppcoin: record my external IP reported by peer
+        if (addrFrom.IsRoutable() && addrMe.IsRoutable())
+            addrSeenByPeer = addrMe;
+
         // Be shy and don't send version until we hear
         if (pfrom->fInbound)
             pfrom->PushVersion();