mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
rpc: call CreateNewBlock via miner interface
This commit is contained in:
@@ -8,11 +8,13 @@
|
||||
#include <uint256.h>
|
||||
|
||||
namespace node {
|
||||
struct CBlockTemplate;
|
||||
struct NodeContext;
|
||||
} // namespace node
|
||||
|
||||
class BlockValidationState;
|
||||
class CBlock;
|
||||
class CScript;
|
||||
|
||||
namespace interfaces {
|
||||
|
||||
@@ -30,6 +32,15 @@ public:
|
||||
//! Returns the hash for the tip of this chain, 0 if none
|
||||
virtual uint256 getTipHash() = 0;
|
||||
|
||||
/**
|
||||
* Construct a new block template
|
||||
*
|
||||
* @param[in] script_pub_key the coinbase output
|
||||
* @param[in] use_mempool set false to omit mempool transactions
|
||||
* @returns a block template
|
||||
*/
|
||||
virtual std::unique_ptr<node::CBlockTemplate> createNewBlock(const CScript& script_pub_key, bool use_mempool = true) = 0;
|
||||
|
||||
/**
|
||||
* Check a block is completely valid from start to finish.
|
||||
* Only works on top of our current best block.
|
||||
|
||||
Reference in New Issue
Block a user