Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/mining.cpp
Show First 20 Lines • Show All 542 Lines • ▼ Show 20 Lines | if (!request.params[0].isNull()) { | ||||
return BIP22ValidationResult(config, state); | return BIP22ValidationResult(config, state); | ||||
} | } | ||||
} | } | ||||
if (strMode != "template") { | if (strMode != "template") { | ||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode"); | throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode"); | ||||
} | } | ||||
if (!g_connman) { | if (!g_rpc_node->connman) { | ||||
throw JSONRPCError( | throw JSONRPCError( | ||||
RPC_CLIENT_P2P_DISABLED, | RPC_CLIENT_P2P_DISABLED, | ||||
"Error: Peer-to-peer functionality missing or disabled"); | "Error: Peer-to-peer functionality missing or disabled"); | ||||
} | } | ||||
if (g_connman->GetNodeCount(CConnman::CONNECTIONS_ALL) == 0) { | if (g_rpc_node->connman->GetNodeCount(CConnman::CONNECTIONS_ALL) == 0) { | ||||
throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, | throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, | ||||
"Bitcoin is not connected!"); | "Bitcoin is not connected!"); | ||||
} | } | ||||
if (::ChainstateActive().IsInitialBlockDownload()) { | if (::ChainstateActive().IsInitialBlockDownload()) { | ||||
throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, PACKAGE_NAME | throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, PACKAGE_NAME | ||||
" is in initial sync and waiting for blocks..."); | " is in initial sync and waiting for blocks..."); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 330 Lines • Show Last 20 Lines |