Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/mining.cpp
Show All 24 Lines | |||||
#include <rpc/server.h> | #include <rpc/server.h> | ||||
#include <rpc/util.h> | #include <rpc/util.h> | ||||
#include <script/descriptor.h> | #include <script/descriptor.h> | ||||
#include <script/script.h> | #include <script/script.h> | ||||
#include <shutdown.h> | #include <shutdown.h> | ||||
#include <txmempool.h> | #include <txmempool.h> | ||||
#include <univalue.h> | #include <univalue.h> | ||||
#include <util/strencodings.h> | #include <util/strencodings.h> | ||||
#include <util/string.h> | |||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <validation.h> | #include <validation.h> | ||||
#include <validationinterface.h> | #include <validationinterface.h> | ||||
#include <warnings.h> | #include <warnings.h> | ||||
#include <cstdint> | #include <cstdint> | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 938 Lines • ▼ Show 20 Lines | static UniValue getblocktemplate(const Config &config, | ||||
result.pushKV("version", pblock->nVersion); | result.pushKV("version", pblock->nVersion); | ||||
result.pushKV("previousblockhash", pblock->hashPrevBlock.GetHex()); | result.pushKV("previousblockhash", pblock->hashPrevBlock.GetHex()); | ||||
result.pushKV("transactions", transactions); | result.pushKV("transactions", transactions); | ||||
result.pushKV("coinbaseaux", aux); | result.pushKV("coinbaseaux", aux); | ||||
result.pushKV("coinbasetxn", coinbasetxn); | result.pushKV("coinbasetxn", coinbasetxn); | ||||
result.pushKV("coinbasevalue", int64_t(coinbasevalue / SATOSHI)); | result.pushKV("coinbasevalue", int64_t(coinbasevalue / SATOSHI)); | ||||
result.pushKV("longpollid", ::ChainActive().Tip()->GetBlockHash().GetHex() + | result.pushKV("longpollid", ::ChainActive().Tip()->GetBlockHash().GetHex() + | ||||
i64tostr(nTransactionsUpdatedLast)); | ToString(nTransactionsUpdatedLast)); | ||||
result.pushKV("target", hashTarget.GetHex()); | result.pushKV("target", hashTarget.GetHex()); | ||||
result.pushKV("mintime", int64_t(pindexPrev->GetMedianTimePast()) + 1); | result.pushKV("mintime", int64_t(pindexPrev->GetMedianTimePast()) + 1); | ||||
result.pushKV("mutable", aMutable); | result.pushKV("mutable", aMutable); | ||||
result.pushKV("noncerange", "00000000ffffffff"); | result.pushKV("noncerange", "00000000ffffffff"); | ||||
result.pushKV("sigoplimit", | result.pushKV("sigoplimit", | ||||
GetMaxBlockSigChecksCount(DEFAULT_MAX_BLOCK_SIZE)); | GetMaxBlockSigChecksCount(DEFAULT_MAX_BLOCK_SIZE)); | ||||
result.pushKV("sizelimit", DEFAULT_MAX_BLOCK_SIZE); | result.pushKV("sizelimit", DEFAULT_MAX_BLOCK_SIZE); | ||||
result.pushKV("curtime", pblock->GetBlockTime()); | result.pushKV("curtime", pblock->GetBlockTime()); | ||||
▲ Show 20 Lines • Show All 180 Lines • Show Last 20 Lines |