mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-25 05:20:01 +01:00
Merge bitcoin/bitcoin#31318: Drop script_pub_key arg from createNewBlock
52fd1511a7test: drop scriptPubKeyIn arg from CreateNewBlock (Sjors Provoost)ff41b9e296Drop script_pub_key arg from createNewBlock (Sjors Provoost)7ab733ede4rpc: rename coinbase_script to coinbase_output_script (Sjors Provoost) Pull request description: Providing a script for the coinbase transaction is only done in test code and for (unoptimized) CPU solo mining. Production miners use the `getblocktemplate` RPC which omits the coinbase transaction entirely from its block template, leaving it to external (pool) software to construct it. This commit removes the `script_pub_key argument` from `createNewBlock()` in the Mining interface. A coinbase script can still be passed via `BlockCreateOptions` instead. Tests are modified to do so. ACKs for top commit: ryanofsky: Code review ACK52fd1511a7. No change since last review other than rebase TheCharlatan: Re-ACK52fd1511a7vasild: ACK52fd1511a7Tree-SHA512: c4b3a53774d9a5dc90950e77f47a64dbb68f971baffbb9a0d8f59332ef8e52d0c039130c925bde73135b3d0e79e65d91d1df30dc4cff13f32d8a72e5c56669d8
This commit is contained in:
@@ -88,11 +88,10 @@ public:
|
||||
/**
|
||||
* Construct a new block template
|
||||
*
|
||||
* @param[in] script_pub_key the coinbase output
|
||||
* @param[in] options options for creating the block
|
||||
* @returns a block template
|
||||
*/
|
||||
virtual std::unique_ptr<BlockTemplate> createNewBlock(const CScript& script_pub_key, const node::BlockCreateOptions& options = {}) = 0;
|
||||
virtual std::unique_ptr<BlockTemplate> createNewBlock(const node::BlockCreateOptions& options = {}) = 0;
|
||||
|
||||
/**
|
||||
* Processes new block. A valid new block is automatically relayed to peers.
|
||||
|
||||
Reference in New Issue
Block a user