|
|
@ -676,8 +676,12 @@ UniValue getblocktemplate(const JSONRPCRequest& request)
|
|
|
|
nSigOpLimit /= WITNESS_SCALE_FACTOR;
|
|
|
|
nSigOpLimit /= WITNESS_SCALE_FACTOR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
result.push_back(Pair("sigoplimit", nSigOpLimit));
|
|
|
|
result.push_back(Pair("sigoplimit", nSigOpLimit));
|
|
|
|
|
|
|
|
if (fPreSegWit) {
|
|
|
|
|
|
|
|
result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_BASE_SIZE));
|
|
|
|
|
|
|
|
} else {
|
|
|
|
result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_SERIALIZED_SIZE));
|
|
|
|
result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_SERIALIZED_SIZE));
|
|
|
|
result.push_back(Pair("weightlimit", (int64_t)MAX_BLOCK_WEIGHT));
|
|
|
|
result.push_back(Pair("weightlimit", (int64_t)MAX_BLOCK_WEIGHT));
|
|
|
|
|
|
|
|
}
|
|
|
|
result.push_back(Pair("curtime", pblock->GetBlockTime()));
|
|
|
|
result.push_back(Pair("curtime", pblock->GetBlockTime()));
|
|
|
|
result.push_back(Pair("bits", strprintf("%08x", pblock->nBits)));
|
|
|
|
result.push_back(Pair("bits", strprintf("%08x", pblock->nBits)));
|
|
|
|
result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1)));
|
|
|
|
result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1)));
|
|
|
|