Interface giving clients (RPC, Stratum v2 Template Provider in the future) ability to create block templates.
More...
#include <mining.h>
Interface giving clients (RPC, Stratum v2 Template Provider in the future) ability to create block templates.
Definition at line 63 of file mining.h.
◆ ~Mining()
virtual interfaces::Mining::~Mining |
( |
| ) |
|
|
virtualdefault |
◆ context()
Get internal node context.
Useful for RPC and testing, but not accessible across processes.
Definition at line 98 of file mining.h.
◆ createNewBlock()
Construct a new block template.
- Parameters
-
[in] | options | options for creating the block |
- Returns
- a block template
◆ getTip()
virtual std::optional< BlockRef > interfaces::Mining::getTip |
( |
| ) |
|
|
pure virtual |
Returns the hash and height for the tip of this chain.
◆ isInitialBlockDownload()
virtual bool interfaces::Mining::isInitialBlockDownload |
( |
| ) |
|
|
pure virtual |
Returns whether IBD is still in progress.
◆ isTestChain()
virtual bool interfaces::Mining::isTestChain |
( |
| ) |
|
|
pure virtual |
If this chain is exclusively used for testing.
◆ waitTipChanged()
Waits for the connected tip to change.
During node initialization, this will wait until the tip is connected.
- Parameters
-
[in] | current_tip | block hash of the current chain tip. Function waits for the chain tip to differ from this. |
[in] | timeout | how long to wait for a new tip |
- Returns
- Hash and height of the current chain tip after this call.
The documentation for this class was generated from the following file: