aboutsummaryrefslogtreecommitdiff
path: root/src/rpcnet.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-04-09 10:51:06 -0700
committerGavin Andresen <gavinandresen@gmail.com>2013-04-09 10:51:06 -0700
commit1fd3ed25be95f79980b03c2ee36f72aea82baa4d (patch)
tree8a6a18ba0a33d17c05d7b1d2b70898cc32e88f21 /src/rpcnet.cpp
parent1483aac5f9a9de9fefbcbbe3edc34429b69aca9e (diff)
parent86648a8d16699ab392508a48bb867d3fc4f7d6cf (diff)
Merge pull request #2461 from sipa/syncnode
Make sure we always have a node to do IBD from
Diffstat (limited to 'src/rpcnet.cpp')
-rw-r--r--src/rpcnet.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index e37b3009dd..644c2675ae 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -51,12 +51,16 @@ Value getpeerinfo(const Array& params, bool fHelp)
obj.push_back(Pair("services", strprintf("%08"PRI64x, stats.nServices)));
obj.push_back(Pair("lastsend", (boost::int64_t)stats.nLastSend));
obj.push_back(Pair("lastrecv", (boost::int64_t)stats.nLastRecv));
+ obj.push_back(Pair("bytessent", (boost::int64_t)stats.nSendBytes));
+ obj.push_back(Pair("bytesrecv", (boost::int64_t)stats.nRecvBytes));
obj.push_back(Pair("conntime", (boost::int64_t)stats.nTimeConnected));
obj.push_back(Pair("version", stats.nVersion));
obj.push_back(Pair("subver", stats.strSubVer));
obj.push_back(Pair("inbound", stats.fInbound));
obj.push_back(Pair("startingheight", stats.nStartingHeight));
obj.push_back(Pair("banscore", stats.nMisbehavior));
+ if (stats.fSyncNode)
+ obj.push_back(Pair("syncnode", true));
ret.push_back(obj);
}