File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ class Mining
30
30
// ! If this chain is exclusively used for testing
31
31
virtual bool isTestChain () = 0;
32
32
33
+ // ! Returns whether IBD is still in progress.
34
+ virtual bool isInitialBlockDownload () = 0;
35
+
33
36
// ! Returns the hash for the tip of this chain
34
37
virtual std::optional<uint256> getTipHash () = 0;
35
38
Original file line number Diff line number Diff line change @@ -847,6 +847,11 @@ class MinerImpl : public Mining
847
847
return chainman ().GetParams ().IsTestChain ();
848
848
}
849
849
850
+ bool isInitialBlockDownload () override
851
+ {
852
+ return chainman ().IsInitialBlockDownload ();
853
+ }
854
+
850
855
std::optional<uint256> getTipHash () override
851
856
{
852
857
LOCK (::cs_main);
Original file line number Diff line number Diff line change @@ -735,7 +735,7 @@ static RPCHelpMan getblocktemplate()
735
735
throw JSONRPCError (RPC_CLIENT_NOT_CONNECTED, PACKAGE_NAME " is not connected!" );
736
736
}
737
737
738
- if (chainman. IsInitialBlockDownload ()) {
738
+ if (miner. isInitialBlockDownload ()) {
739
739
throw JSONRPCError (RPC_CLIENT_IN_INITIAL_DOWNLOAD, PACKAGE_NAME " is in initial sync and waiting for blocks..." );
740
740
}
741
741
}
You can’t perform that action at this time.
0 commit comments