aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/mining.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/mining.h')
-rw-r--r--src/interfaces/mining.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/interfaces/mining.h b/src/interfaces/mining.h
index b96881f67c..7d71a01450 100644
--- a/src/interfaces/mining.h
+++ b/src/interfaces/mining.h
@@ -5,6 +5,7 @@
#ifndef BITCOIN_INTERFACES_MINING_H
#define BITCOIN_INTERFACES_MINING_H
+#include <memory>
#include <optional>
#include <uint256.h>
@@ -44,6 +45,7 @@ public:
* @returns a block template
*/
virtual std::unique_ptr<node::CBlockTemplate> createNewBlock(const CScript& script_pub_key, bool use_mempool = true) = 0;
+
/**
* Processes new block. A valid new block is automatically relayed to peers.
*
@@ -62,12 +64,12 @@ public:
* Only works on top of our current best block.
* Does not check proof-of-work.
*
- * @param[out] state details of why a block failed to validate
* @param[in] block the block to validate
* @param[in] check_merkle_root call CheckMerkleRoot()
- * @returns false if any of the checks fail
+ * @param[out] state details of why a block failed to validate
+ * @returns false if it does not build on the current tip, or any of the checks fail
*/
- virtual bool testBlockValidity(BlockValidationState& state, const CBlock& block, bool check_merkle_root = true) = 0;
+ virtual bool testBlockValidity(const CBlock& block, bool check_merkle_root, BlockValidationState& state) = 0;
//! Get internal node context. Useful for RPC and testing,
//! but not accessible across processes.