rpc: call IsInitialBlockDownload via miner interface

This commit is contained in:
Sjors Provoost
2024-06-18 21:07:51 +02:00
parent dda0b0834f
commit a9716c53f0
3 changed files with 9 additions and 1 deletions

View File

@@ -735,7 +735,7 @@ static RPCHelpMan getblocktemplate()
throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, PACKAGE_NAME " is not connected!");
}
if (chainman.IsInitialBlockDownload()) {
if (miner.isInitialBlockDownload()) {
throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, PACKAGE_NAME " is in initial sync and waiting for blocks...");
}
}