aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2013-10-21 04:13:11 -0700
committerWladimir J. van der Laan <[email protected]>2013-10-21 04:13:11 -0700
commit0c1222ff848bce72525ddcac3f199de48d407d3c (patch)
treecb38813107fc20a5a7a5749f4812d6ec0bf785d7 /src/net.cpp
parentMerge pull request #3104 from Diapolo/rpcssl-defaultciphers (diff)
parentAdding new "addrlocal" field to RPC getpeerinfo. (diff)
downloaddiscoin-0c1222ff848bce72525ddcac3f199de48d407d3c.tar.xz
discoin-0c1222ff848bce72525ddcac3f199de48d407d3c.zip
Merge pull request #2929 from Krellan/addrlocal
Additional field to RPC getpeerinfo output: addrlocal
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp
index dd7bf283a..d223b3999 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -639,6 +639,9 @@ void CNode::copyStats(CNodeStats &stats)
// Raw ping time is in microseconds, but show it to user as whole seconds (Bitcoin users should be well used to small numbers with many decimal places by now :)
stats.dPingTime = (((double)nPingUsecTime) / 1e6);
stats.dPingWait = (((double)nPingUsecWait) / 1e6);
+
+ // Leave string empty if addrLocal invalid (not filled in yet)
+ stats.addrLocal = addrLocal.IsValid() ? addrLocal.ToString() : "";
}
#undef X