mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-25 05:20:01 +01: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user