mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
Introduce Mining interface
Start out with a single method isTestChain() that's used by the getblocktemplate RPC.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user