Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.cpp
Show First 20 Lines • Show All 1,559 Lines • ▼ Show 20 Lines | UniValue getblockchaininfo(const Config &config, | ||||
UniValue softforks(UniValue::VOBJ); | UniValue softforks(UniValue::VOBJ); | ||||
for (int i = 0; i < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; i++) { | for (int i = 0; i < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; i++) { | ||||
BIP9SoftForkDescPushBack(softforks, chainparams.GetConsensus(), | BIP9SoftForkDescPushBack(softforks, chainparams.GetConsensus(), | ||||
Consensus::DeploymentPos(i)); | Consensus::DeploymentPos(i)); | ||||
} | } | ||||
obj.pushKV("softforks", softforks); | obj.pushKV("softforks", softforks); | ||||
obj.pushKV("warnings", GetWarnings("statusbar")); | obj.pushKV("warnings", GetWarnings(false)); | ||||
return obj; | return obj; | ||||
} | } | ||||
/** Comparison function for sorting the getchaintips heads. */ | /** Comparison function for sorting the getchaintips heads. */ | ||||
struct CompareBlocksByHeight { | struct CompareBlocksByHeight { | ||||
bool operator()(const CBlockIndex *a, const CBlockIndex *b) const { | bool operator()(const CBlockIndex *a, const CBlockIndex *b) const { | ||||
// Make sure that unequal blocks with the same height do not compare | // Make sure that unequal blocks with the same height do not compare | ||||
// equal. Use the pointers themselves to make a distinction. | // equal. Use the pointers themselves to make a distinction. | ||||
▲ Show 20 Lines • Show All 1,375 Lines • Show Last 20 Lines |