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

@@ -34,9 +34,12 @@ public:
virtual ~BlockTemplate() = default;
virtual CBlockHeader getBlockHeader() = 0;
// Block contains a dummy coinbase transaction that should not be used.
virtual CBlock getBlock() = 0;
// Fees per transaction, not including coinbase transaction.
virtual std::vector<CAmount> getTxFees() = 0;
// Sigop cost per transaction, not including coinbase transaction.
virtual std::vector<int64_t> getTxSigops() = 0;
virtual CTransactionRef getCoinbaseTx() = 0;