Remove use of IsInitialBlockDownload in wallet code
This commit does not change behavior.
This commit is contained in:
parent
1106a6fde4
commit
a1df1b48a8
3 changed files with 5 additions and 1 deletions
|
@ -248,6 +248,7 @@ public:
|
||||||
CAmount maxTxFee() override { return ::maxTxFee; }
|
CAmount maxTxFee() override { return ::maxTxFee; }
|
||||||
bool getPruneMode() override { return ::fPruneMode; }
|
bool getPruneMode() override { return ::fPruneMode; }
|
||||||
bool p2pEnabled() override { return g_connman != nullptr; }
|
bool p2pEnabled() override { return g_connman != nullptr; }
|
||||||
|
bool isInitialBlockDownload() override { return IsInitialBlockDownload(); }
|
||||||
int64_t getAdjustedTime() override { return GetAdjustedTime(); }
|
int64_t getAdjustedTime() override { return GetAdjustedTime(); }
|
||||||
void initMessage(const std::string& message) override { ::uiInterface.InitMessage(message); }
|
void initMessage(const std::string& message) override { ::uiInterface.InitMessage(message); }
|
||||||
void initWarning(const std::string& message) override { InitWarning(message); }
|
void initWarning(const std::string& message) override { InitWarning(message); }
|
||||||
|
|
|
@ -178,6 +178,9 @@ public:
|
||||||
//! Check if p2p enabled.
|
//! Check if p2p enabled.
|
||||||
virtual bool p2pEnabled() = 0;
|
virtual bool p2pEnabled() = 0;
|
||||||
|
|
||||||
|
// Check if in IBD.
|
||||||
|
virtual bool isInitialBlockDownload() = 0;
|
||||||
|
|
||||||
//! Get adjusted time.
|
//! Get adjusted time.
|
||||||
virtual int64_t getAdjustedTime() = 0;
|
virtual int64_t getAdjustedTime() = 0;
|
||||||
|
|
||||||
|
|
|
@ -3889,7 +3889,7 @@ UniValue sethdseed(const JSONRPCRequest& request)
|
||||||
}.ToString());
|
}.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsInitialBlockDownload()) {
|
if (pwallet->chain().isInitialBlockDownload()) {
|
||||||
throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Cannot set a new HD seed while still in Initial Block Download");
|
throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Cannot set a new HD seed while still in Initial Block Download");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue