@@ -41,6 +41,7 @@ CCriticalSection cs_main;
4141
4242BlockMap mapBlockIndex;
4343CChain chainActive;
44+ CBlockIndex *pindexBestHeader = NULL ;
4445int64_t nTimeBestReceived = 0 ;
4546CWaitableCriticalSection csBestBlock;
4647CConditionVariable cvBlockChange;
@@ -51,6 +52,7 @@ bool fTxIndex = false;
5152bool fIsBareMultisigStd = true ;
5253unsigned int nCoinCacheSize = 5000 ;
5354
55+
5456/* * Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */
5557CFeeRate minRelayTxFee = CFeeRate(1000 );
5658
@@ -98,8 +100,6 @@ namespace {
98100 // The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS or better that are at least
99101 // as good as our current tip. Entries may be failed, though.
100102 set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexValid;
101- // Best header we've seen so far (used for getheaders queries' starting points).
102- CBlockIndex *pindexBestHeader = NULL ;
103103 // Number of nodes with fSyncStarted.
104104 int nSyncStarted = 0 ;
105105 // All pairs A->B, where A (or one if its ancestors) misses transactions, but B has transactions.
@@ -440,6 +440,11 @@ bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) {
440440 return false ;
441441 stats.nMisbehavior = state->nMisbehavior ;
442442 stats.nSyncHeight = state->pindexBestKnownBlock ? state->pindexBestKnownBlock ->nHeight : -1 ;
443+ stats.nCommonHeight = state->pindexLastCommonBlock ? state->pindexLastCommonBlock ->nHeight : -1 ;
444+ BOOST_FOREACH (const QueuedBlock& queue, state->vBlocksInFlight ) {
445+ if (queue.pindex )
446+ stats.vHeightInFlight .push_back (queue.pindex ->nHeight );
447+ }
443448 return true ;
444449}
445450
0 commit comments