mining: drop unused -nFees and sigops from CBlockTemplate

For the coinbase vTxFees used a dummy value of -nFees. This
value was never returned by the RPC or used in a test.

Similarly the fist vTxSigOpsCost entry was calculated from
the dummy coinbase transaction.

Drop both and add code comments to prevent confusion.
This commit is contained in:
Sjors Provoost
2025-02-21 09:11:17 +01:00
parent 53ad845fb9
commit 226d81f8b7
4 changed files with 8 additions and 6 deletions

View File

@@ -893,7 +893,7 @@ static RPCHelpMan getblocktemplate()
}
entry.pushKV("depends", std::move(deps));
int index_in_template = i - 1;
int index_in_template = i - 2;
entry.pushKV("fee", tx_fees.at(index_in_template));
int64_t nTxSigOps{tx_sigops.at(index_in_template)};
if (fPreSegWit) {