mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-25 13:28:35 +01:00
Add waitNext() to BlockTemplate interface
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <consensus/amount.h> // for CAmount
|
||||
#include <interfaces/types.h> // for BlockRef
|
||||
#include <node/types.h> // for BlockCreateOptions
|
||||
#include <node/types.h> // for BlockCreateOptions, BlockWaitOptions
|
||||
#include <primitives/block.h> // for CBlock, CBlockHeader
|
||||
#include <primitives/transaction.h> // for CTransactionRef
|
||||
#include <stdint.h> // for int64_t
|
||||
@@ -56,6 +56,16 @@ public:
|
||||
* @returns if the block was processed, independent of block validity
|
||||
*/
|
||||
virtual bool submitSolution(uint32_t version, uint32_t timestamp, uint32_t nonce, CTransactionRef coinbase) = 0;
|
||||
|
||||
/**
|
||||
* Waits for fees in the next block to rise, a new tip or the timeout.
|
||||
*
|
||||
* @param[in] options Control the timeout (default forever) and by how much total fees
|
||||
* for the next block should rise (default infinite).
|
||||
*
|
||||
* @returns a new BlockTemplate or nothing if the timeout occurs.
|
||||
*/
|
||||
virtual std::unique_ptr<BlockTemplate> waitNext(const node::BlockWaitOptions options = {}) = 0;
|
||||
};
|
||||
|
||||
//! Interface giving clients (RPC, Stratum v2 Template Provider in the future)
|
||||
|
||||
Reference in New Issue
Block a user