mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-25 05:20:01 +01:00
Drop script_pub_key arg from createNewBlock
Providing a script for the coinbase transaction is only done in test code and for 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. A coinbase script can still be passed via BlockCreateOptions instead. A temporary overload is added so that the test can be modified in the next commit.
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