getmininginfo
’s currentblockweight
field is not accurate. getblock
on the latest mined block shows a different weight. This corrects that behaviour by storing the actual serialized weight instead of an estimate.
getmininginfo
’s currentblockweight
field is not accurate. getblock
on the latest mined block shows a different weight. This corrects that behaviour by storing the actual serialized weight instead of an estimate.
146@@ -148,12 +147,14 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
147 coinbaseTx.vout.resize(1);
148 coinbaseTx.vout[0].scriptPubKey = scriptPubKeyIn;
149 coinbaseTx.vout[0].nValue = nFees + GetBlockSubsidy(nHeight, chainparams.GetConsensus());
150- coinbaseTx.vin[0].scriptSig = CScript() << nHeight << OP_0;
151+ coinbaseTx.vin[0].scriptSig = CScript() << nHeight << CScriptNum(1);
GetBlockWeight
calculation is accurate and not 4 less.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
generatetoaddress
. I doubt that’s worth it though, so closing.
Labels
Mining