mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Introduce Mining interface
Start out with a single method isTestChain() that's used by the getblocktemplate RPC.
This commit is contained in:
parent
9c5cdf07f3
commit
8ecb681678
14 changed files with 85 additions and 3 deletions
|
|
@ -101,6 +101,14 @@ CConnman& EnsureConnman(const NodeContext& node)
|
|||
return *node.connman;
|
||||
}
|
||||
|
||||
interfaces::Mining& EnsureMining(const NodeContext& node)
|
||||
{
|
||||
if (!node.mining) {
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Node miner not found");
|
||||
}
|
||||
return *node.mining;
|
||||
}
|
||||
|
||||
PeerManager& EnsurePeerman(const NodeContext& node)
|
||||
{
|
||||
if (!node.peerman) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue