Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.cpp
Show First 20 Lines • Show All 2,227 Lines • ▼ Show 20 Lines | static T CalculateTruncatedMedian(std::vector<T> &scores) { | ||||
} | } | ||||
} | } | ||||
template <typename T> static inline bool SetHasKeys(const std::set<T> &set) { | template <typename T> static inline bool SetHasKeys(const std::set<T> &set) { | ||||
return false; | return false; | ||||
} | } | ||||
template <typename T, typename Tk, typename... Args> | template <typename T, typename Tk, typename... Args> | ||||
static inline bool SetHasKeys(const std::set<T> &set, const Tk &key, | static inline bool SetHasKeys(const std::set<T> &set, const Tk &key, | ||||
const Args &... args) { | const Args &...args) { | ||||
return (set.count(key) != 0) || SetHasKeys(set, args...); | return (set.count(key) != 0) || SetHasKeys(set, args...); | ||||
} | } | ||||
// outpoint (needed for the utxo index) + nHeight + fCoinBase | // outpoint (needed for the utxo index) + nHeight + fCoinBase | ||||
static constexpr size_t PER_UTXO_OVERHEAD = | static constexpr size_t PER_UTXO_OVERHEAD = | ||||
sizeof(COutPoint) + sizeof(uint32_t) + sizeof(bool); | sizeof(COutPoint) + sizeof(uint32_t) + sizeof(bool); | ||||
static RPCHelpMan getblockstats() { | static RPCHelpMan getblockstats() { | ||||
▲ Show 20 Lines • Show All 861 Lines • Show Last 20 Lines |