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 79 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 119 of file mining.h.
◆ createNewBlock()
Construct a new block template.
During node initialization, this will wait until the tip is connected.
- Parameters
-
[in] | options | options for creating the block |
- Return values
-
BlockTemplate | a block template. |
std::nullptr | if the node is shut down. |
◆ 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 (regardless of timeout
).
- 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 (default is forever) |
- Return values
-
BlockRef | hash and height of the current chain tip after this call. |
std::nullopt | if the node is shut down. |
The documentation for this class was generated from the following file: