|
|
@ -41,6 +41,7 @@ CCriticalSection cs_main; |
|
|
|
|
|
|
|
|
|
|
|
BlockMap mapBlockIndex; |
|
|
|
BlockMap mapBlockIndex; |
|
|
|
CChain chainActive; |
|
|
|
CChain chainActive; |
|
|
|
|
|
|
|
CBlockIndex *pindexBestHeader = NULL; |
|
|
|
int64_t nTimeBestReceived = 0; |
|
|
|
int64_t nTimeBestReceived = 0; |
|
|
|
CWaitableCriticalSection csBestBlock; |
|
|
|
CWaitableCriticalSection csBestBlock; |
|
|
|
CConditionVariable cvBlockChange; |
|
|
|
CConditionVariable cvBlockChange; |
|
|
@ -51,6 +52,7 @@ bool fTxIndex = false; |
|
|
|
bool fIsBareMultisigStd = true; |
|
|
|
bool fIsBareMultisigStd = true; |
|
|
|
unsigned int nCoinCacheSize = 5000; |
|
|
|
unsigned int nCoinCacheSize = 5000; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */ |
|
|
|
/** Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */ |
|
|
|
CFeeRate minRelayTxFee = CFeeRate(1000); |
|
|
|
CFeeRate minRelayTxFee = CFeeRate(1000); |
|
|
|
|
|
|
|
|
|
|
@ -98,8 +100,6 @@ namespace { |
|
|
|
// The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS or better that are at least
|
|
|
|
// The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS or better that are at least
|
|
|
|
// as good as our current tip. Entries may be failed, though.
|
|
|
|
// as good as our current tip. Entries may be failed, though.
|
|
|
|
set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexValid; |
|
|
|
set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexValid; |
|
|
|
// Best header we've seen so far (used for getheaders queries' starting points).
|
|
|
|
|
|
|
|
CBlockIndex *pindexBestHeader = NULL; |
|
|
|
|
|
|
|
// Number of nodes with fSyncStarted.
|
|
|
|
// Number of nodes with fSyncStarted.
|
|
|
|
int nSyncStarted = 0; |
|
|
|
int nSyncStarted = 0; |
|
|
|
// All pairs A->B, where A (or one if its ancestors) misses transactions, but B has transactions.
|
|
|
|
// 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) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
stats.nMisbehavior = state->nMisbehavior; |
|
|
|
stats.nMisbehavior = state->nMisbehavior; |
|
|
|
stats.nSyncHeight = state->pindexBestKnownBlock ? state->pindexBestKnownBlock->nHeight : -1; |
|
|
|
stats.nSyncHeight = state->pindexBestKnownBlock ? state->pindexBestKnownBlock->nHeight : -1; |
|
|
|
|
|
|
|
stats.nCommonHeight = state->pindexLastCommonBlock ? state->pindexLastCommonBlock->nHeight : -1; |
|
|
|
|
|
|
|
BOOST_FOREACH(const QueuedBlock& queue, state->vBlocksInFlight) { |
|
|
|
|
|
|
|
if (queue.pindex) |
|
|
|
|
|
|
|
stats.vHeightInFlight.push_back(queue.pindex->nHeight); |
|
|
|
|
|
|
|
} |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|