aboutsummaryrefslogtreecommitdiff
path: root/src/rpcnet.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-10-17 12:24:29 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-10-17 12:30:54 +0200
commit84d13eef883769451ba9f77b56d9738d24474d5c (patch)
treecc161844cd5cd599a3eac8787dffb11c16118cc4 /src/rpcnet.cpp
parent8e9a665f5518637b618d8b1f74d440ac07b482cf (diff)
parente11b2ce4c63b87efa60b163b50d155969ccd7e08 (diff)
downloadbitcoin-84d13eef883769451ba9f77b56d9738d24474d5c.tar.xz
Merge pull request #4468
e11b2ce Fix large reorgs (Pieter Wuille) afc32c5 Fix rebuild-chainstate feature and improve its performance (Pieter Wuille) 16d5194 Skip reindexed blocks individually (Pieter Wuille) ad96e7c Make -reindex cope with out-of-order blocks (Wladimir J. van der Laan) e17bd58 Rename setBlockIndexValid to setBlockIndexCandidates (Pieter Wuille) 1af838b Add height to "Requesting block" debug (R E Broadley) 1bcee67 Better logging of stalling (R E Broadley) 4c93322 Improve getheaders (sending) logging (R E Broadley) f244c99 Remove CheckMinWork, as we always know all parent headers (Pieter Wuille) ad6e601 RPC additions after headers-first (Pieter Wuille) 341735e Headers-first synchronization (Pieter Wuille)
Diffstat (limited to 'src/rpcnet.cpp')
-rw-r--r--src/rpcnet.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index bc19d1372a..12dcd5b540 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -97,7 +97,12 @@ Value getpeerinfo(const Array& params, bool fHelp)
" \"inbound\": true|false, (boolean) Inbound (true) or Outbound (false)\n"
" \"startingheight\": n, (numeric) The starting height (block) of the peer\n"
" \"banscore\": n, (numeric) The ban score\n"
- " \"syncnode\": true|false (boolean) if sync node\n"
+ " \"synced_headers\": n, (numeric) The last header we have in common with this peer\n"
+ " \"synced_blocks\": n, (numeric) The last block we have in common with this peer\n"
+ " \"inflight\": [\n"
+ " n, (numeric) The heights of blocks we're currently asking from this peer\n"
+ " ...\n"
+ " ]\n"
" }\n"
" ,...\n"
"]\n"
@@ -137,9 +142,14 @@ Value getpeerinfo(const Array& params, bool fHelp)
obj.push_back(Pair("startingheight", stats.nStartingHeight));
if (fStateStats) {
obj.push_back(Pair("banscore", statestats.nMisbehavior));
- obj.push_back(Pair("syncheight", statestats.nSyncHeight));
+ obj.push_back(Pair("synced_headers", statestats.nSyncHeight));
+ obj.push_back(Pair("synced_blocks", statestats.nCommonHeight));
+ Array heights;
+ BOOST_FOREACH(int height, statestats.vHeightInFlight) {
+ heights.push_back(height);
+ }
+ obj.push_back(Pair("inflight", heights));
}
- obj.push_back(Pair("syncnode", stats.fSyncNode));
obj.push_back(Pair("whitelisted", stats.fWhitelisted));
ret.push_back(obj);