mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-21 20:28:59 +02:00
Merge bitcoin/bitcoin#31897: mining: drop unused -nFees and sigops from CBlockTemplate
226d81f8b7mining: drop unused -nFees and sigops from CBlockTemplate (Sjors Provoost)53ad845fb9test: check fees and sigops in getblocktemplate (Sjors Provoost) Pull request description: For the coinbase `vTxFees` used a dummy value of -nFees. Similarly the first `vTxSigOpsCost` entry was calculated from the dummy coinbase transaction. This was introduced in #2115, but the values were never returned by the RPC or used in a test. Drop 'm and add code comments to prevent confusion. This PR also adds test coverage for the `fees` and `sigops` fields in `getblocktemplate`, so it closes #32053. ACKs for top commit: ismaelsadeeq: re-ACK226d81f8b7ryanofsky: Code review ACK226d81f8b7. New test was added since last review, which seems very cleanly written and fixes some missing coverage. glozow: ACK226d81f8b7Tree-SHA512: 79c534e6bc4810d29114b04dd6db798877732cb473e773bf3cc28f83d14ee3982392587bd0baa39857bd53a79eae3b730d7a7029b08a9b6c3b5c51f86657ca5d
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user