File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -658,11 +658,15 @@ static RPCHelpMan getblocktemplate()
658
658
if (!node.connman )
659
659
throw JSONRPCError (RPC_CLIENT_P2P_DISABLED, " Error: Peer-to-peer functionality missing or disabled" );
660
660
661
- if (node.connman ->GetNodeCount (CConnman::CONNECTIONS_ALL) == 0 )
662
- throw JSONRPCError (RPC_CLIENT_NOT_CONNECTED, PACKAGE_NAME " is not connected!" );
661
+ if (!Params ().IsTestChain ()) {
662
+ if (node.connman ->GetNodeCount (CConnman::CONNECTIONS_ALL) == 0 ) {
663
+ throw JSONRPCError (RPC_CLIENT_NOT_CONNECTED, PACKAGE_NAME " is not connected!" );
664
+ }
663
665
664
- if (::ChainstateActive ().IsInitialBlockDownload ())
665
- throw JSONRPCError (RPC_CLIENT_IN_INITIAL_DOWNLOAD, PACKAGE_NAME " is in initial sync and waiting for blocks..." );
666
+ if (::ChainstateActive ().IsInitialBlockDownload ()) {
667
+ throw JSONRPCError (RPC_CLIENT_IN_INITIAL_DOWNLOAD, PACKAGE_NAME " is in initial sync and waiting for blocks..." );
668
+ }
669
+ }
666
670
667
671
static unsigned int nTransactionsUpdatedLast;
668
672
const CTxMemPool& mempool = EnsureMemPool (request.context );
You can’t perform that action at this time.
0 commit comments