interfaces: add interruptWait method

- This method can be used to cancel a running
  waitNext().

- This commit also adds a test case for interruptWait method
This commit is contained in:
ismaelsadeeq
2025-10-22 12:02:12 +02:00
parent 563747971b
commit dcb56fd4cb
6 changed files with 54 additions and 4 deletions

View File

@@ -72,6 +72,11 @@ public:
* the tip is more than 20 minutes old.
*/
virtual std::unique_ptr<BlockTemplate> waitNext(const node::BlockWaitOptions options = {}) = 0;
/**
* Interrupts the current wait for the next block template.
*/
virtual void interruptWait() = 0;
};
//! Interface giving clients (RPC, Stratum v2 Template Provider in the future)