Remove use of IsInitialBlockDownload in wallet code

This commit does not change behavior.
This commit is contained in:
Russell Yanofsky 2018-07-10 15:48:03 -04:00
parent 1106a6fde4
commit a1df1b48a8
3 changed files with 5 additions and 1 deletions

View file

@ -248,6 +248,7 @@ public:
CAmount maxTxFee() override { return ::maxTxFee; }
bool getPruneMode() override { return ::fPruneMode; }
bool p2pEnabled() override { return g_connman != nullptr; }
bool isInitialBlockDownload() override { return IsInitialBlockDownload(); }
int64_t getAdjustedTime() override { return GetAdjustedTime(); }
void initMessage(const std::string& message) override { ::uiInterface.InitMessage(message); }
void initWarning(const std::string& message) override { InitWarning(message); }

View file

@ -178,6 +178,9 @@ public:
//! Check if p2p enabled.
virtual bool p2pEnabled() = 0;
// Check if in IBD.
virtual bool isInitialBlockDownload() = 0;
//! Get adjusted time.
virtual int64_t getAdjustedTime() = 0;

View file

@ -3889,7 +3889,7 @@ UniValue sethdseed(const JSONRPCRequest& request)
}.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");
}