Skip to content

Commit a1df1b4

Browse files
committed
Remove use of IsInitialBlockDownload in wallet code
This commit does not change behavior.
1 parent 1106a6f commit a1df1b4

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/interfaces/chain.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ class ChainImpl : public Chain
248248
CAmount maxTxFee() override { return ::maxTxFee; }
249249
bool getPruneMode() override { return ::fPruneMode; }
250250
bool p2pEnabled() override { return g_connman != nullptr; }
251+
bool isInitialBlockDownload() override { return IsInitialBlockDownload(); }
251252
int64_t getAdjustedTime() override { return GetAdjustedTime(); }
252253
void initMessage(const std::string& message) override { ::uiInterface.InitMessage(message); }
253254
void initWarning(const std::string& message) override { InitWarning(message); }

src/interfaces/chain.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ class Chain
178178
//! Check if p2p enabled.
179179
virtual bool p2pEnabled() = 0;
180180

181+
// Check if in IBD.
182+
virtual bool isInitialBlockDownload() = 0;
183+
181184
//! Get adjusted time.
182185
virtual int64_t getAdjustedTime() = 0;
183186

src/wallet/rpcwallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3889,7 +3889,7 @@ UniValue sethdseed(const JSONRPCRequest& request)
38893889
}.ToString());
38903890
}
38913891

3892-
if (IsInitialBlockDownload()) {
3892+
if (pwallet->chain().isInitialBlockDownload()) {
38933893
throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Cannot set a new HD seed while still in Initial Block Download");
38943894
}
38953895

0 commit comments

Comments
 (0)