Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.cpp
Show All 27 Lines | |||||
#include <script/descriptor.h> | #include <script/descriptor.h> | ||||
#include <streams.h> | #include <streams.h> | ||||
#include <txdb.h> | #include <txdb.h> | ||||
#include <txmempool.h> | #include <txmempool.h> | ||||
#include <undo.h> | #include <undo.h> | ||||
#include <util/ref.h> | #include <util/ref.h> | ||||
#include <util/strencodings.h> | #include <util/strencodings.h> | ||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <util/translation.h> | |||||
#include <validation.h> | #include <validation.h> | ||||
#include <validationinterface.h> | #include <validationinterface.h> | ||||
#include <versionbitsinfo.h> // For VersionBitsDeploymentInfo | #include <versionbitsinfo.h> // For VersionBitsDeploymentInfo | ||||
#include <warnings.h> | #include <warnings.h> | ||||
#include <condition_variable> | #include <condition_variable> | ||||
#include <cstdint> | #include <cstdint> | ||||
#include <memory> | #include <memory> | ||||
▲ Show 20 Lines • Show All 1,528 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(false)); | obj.pushKV("warnings", GetWarnings(false).original); | ||||
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,390 Lines • Show Last 20 Lines |