Honor mining peer requirement in block templates

This commit is contained in:
2026-05-08 10:12:25 -07:00
parent bb5350aca5
commit eb87369a49
+1 -1
View File
@@ -460,7 +460,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
if (strMode != "template") if (strMode != "template")
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode"); throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode");
if (vNodes.empty()) if (vNodes.empty() && Params().MiningRequiresPeers())
throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Agrarian is not connected!"); throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Agrarian is not connected!");
if (IsInitialBlockDownload()) if (IsInitialBlockDownload())