aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoinrpc.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-06-04 14:15:19 -0400
committerGavin Andresen <gavinandresen@gmail.com>2012-06-04 14:15:19 -0400
commit46e06b875d861661c4a3002e8ae3d080b5893053 (patch)
treea22d1310831e7cd5494141a4e07e6e8182854d6f /src/bitcoinrpc.cpp
parent9f46a3e32abf516fafabeda08a21cc69af876113 (diff)
parent587f929c6462698a674fe8add2f301161219d05a (diff)
Merge branch 'netopt' of https://github.com/sipa/bitcoin
Diffstat (limited to 'src/bitcoinrpc.cpp')
-rw-r--r--src/bitcoinrpc.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index 1e32f055bb..999c6dda09 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -531,6 +531,9 @@ Value getinfo(const Array& params, bool fHelp)
"getinfo\n"
"Returns an object containing various state info.");
+ CService addrProxy;
+ GetProxy(NET_IPV4, addrProxy);
+
Object obj;
obj.push_back(Pair("version", (int)CLIENT_VERSION));
obj.push_back(Pair("protocolversion",(int)PROTOCOL_VERSION));
@@ -538,7 +541,7 @@ Value getinfo(const Array& params, bool fHelp)
obj.push_back(Pair("balance", ValueFromAmount(pwalletMain->GetBalance())));
obj.push_back(Pair("blocks", (int)nBestHeight));
obj.push_back(Pair("connections", (int)vNodes.size()));
- obj.push_back(Pair("proxy", (fUseProxy ? addrProxy.ToStringIPPort() : string())));
+ obj.push_back(Pair("proxy", (addrProxy.IsValid() ? addrProxy.ToStringIPPort() : string())));
obj.push_back(Pair("difficulty", (double)GetDifficulty()));
obj.push_back(Pair("testnet", fTestNet));
obj.push_back(Pair("keypoololdest", (boost::int64_t)pwalletMain->GetOldestKeyPoolTime()));