diff options
Diffstat (limited to 'src/interfaces/mining.h')
-rw-r--r-- | src/interfaces/mining.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/interfaces/mining.h b/src/interfaces/mining.h index 421c5ba762..c77f3c30a2 100644 --- a/src/interfaces/mining.h +++ b/src/interfaces/mining.h @@ -42,6 +42,20 @@ public: virtual CTransactionRef getCoinbaseTx() = 0; virtual std::vector<unsigned char> getCoinbaseCommitment() = 0; virtual int getWitnessCommitmentIndex() = 0; + + /** + * Compute merkle path to the coinbase transaction + * + * @return merkle path ordered from the deepest + */ + virtual std::vector<uint256> getCoinbaseMerklePath() = 0; + + /** + * Construct and broadcast the block. + * + * @returns if the block was processed, independent of block validity + */ + virtual bool submitSolution(uint32_t version, uint32_t timestamp, uint32_t nonce, CMutableTransaction coinbase) = 0; }; //! Interface giving clients (RPC, Stratum v2 Template Provider in the future) @@ -61,11 +75,11 @@ public: virtual std::optional<BlockRef> getTip() = 0; /** - * Waits for the tip to change + * Waits for the connected tip to change. If the tip was not connected on + * startup, this will wait. * * @param[in] current_tip block hash of the current chain tip. Function waits - * for the chain tip to change if this matches, otherwise - * it returns right away. + * for the chain tip to differ from this. * @param[in] timeout how long to wait for a new tip * @returns Hash and height of the current chain tip after this call. */ |