Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/mining.cpp
Show First 20 Lines • Show All 679 Lines • ▼ Show 20 Lines | static UniValue getblocktemplate(const Config &config, | ||||
UniValue aCaps(UniValue::VARR); | UniValue aCaps(UniValue::VARR); | ||||
aCaps.push_back("proposal"); | aCaps.push_back("proposal"); | ||||
UniValue transactions(UniValue::VARR); | UniValue transactions(UniValue::VARR); | ||||
std::map<uint256, int64_t> setTxIndex; | std::map<uint256, int64_t> setTxIndex; | ||||
int i = 0; | int i = 0; | ||||
for (const auto &it : pblock->vtx) { | for (const auto &it : pblock->vtx) { | ||||
const CTransaction &tx = *it; | const CTransaction &tx = *it; | ||||
uint256 txId = tx.GetId(); | uint256 txId = tx.GetHash(); | ||||
setTxIndex[txId] = i++; | setTxIndex[txId] = i++; | ||||
if (tx.IsCoinBase()) { | if (tx.IsCoinBase()) { | ||||
continue; | continue; | ||||
} | } | ||||
UniValue entry(UniValue::VOBJ); | UniValue entry(UniValue::VOBJ); | ||||
▲ Show 20 Lines • Show All 401 Lines • Show Last 20 Lines |