Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/mining.cpp
Show All 25 Lines | |||||
#include <txmempool.h> | #include <txmempool.h> | ||||
#include <util/strencodings.h> | #include <util/strencodings.h> | ||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <util/validation.h> | #include <util/validation.h> | ||||
#include <validation.h> | #include <validation.h> | ||||
#include <validationinterface.h> | #include <validationinterface.h> | ||||
#include <warnings.h> | #include <warnings.h> | ||||
#include <univalue.h> | |||||
#include <cstdint> | #include <cstdint> | ||||
#include <memory> | |||||
/** | /** | ||||
* Return average network hashes per second based on the last 'lookup' blocks, | * Return average network hashes per second based on the last 'lookup' blocks, | ||||
* or from the last difficulty change if 'lookup' is nonpositive. If 'height' is | * or from the last difficulty change if 'lookup' is nonpositive. If 'height' is | ||||
* nonnegative, compute the estimate at the time when a given block was found. | * nonnegative, compute the estimate at the time when a given block was found. | ||||
*/ | */ | ||||
static UniValue GetNetworkHashPS(int lookup, int height) { | static UniValue GetNetworkHashPS(int lookup, int height) { | ||||
CBlockIndex *pb = ::ChainActive().Tip(); | CBlockIndex *pb = ::ChainActive().Tip(); | ||||
▲ Show 20 Lines • Show All 820 Lines • Show Last 20 Lines |