aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2021-07-15 12:33:16 -0400
committerAndrew Chow <achow101-github@achow101.com>2021-07-15 12:33:16 -0400
commit48bd7d3b7737656052d2c745ed40c7f6670842cf (patch)
tree3b3106f8d9afb1ef886399956ae2bbcdae06778f
parenta88fa1a555195af6543cdc802e8e1c2e1668dd38 (diff)
downloadbitcoin-48bd7d3b7737656052d2c745ed40c7f6670842cf.tar.xz
Change ScriptPubKeyMan::Upgrade to default to return true
If a ScriptPubKeyMan does not implement Upgrade, then using upgraewallet will fail unexpectedly. By changing the default to return true, then this error can be avoided. This is still correct because a successful upgrade can be that nothing happened.
-rw-r--r--src/wallet/scriptpubkeyman.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h
index 572a695662..e329e0cf8f 100644
--- a/src/wallet/scriptpubkeyman.h
+++ b/src/wallet/scriptpubkeyman.h
@@ -207,7 +207,7 @@ public:
virtual bool CanGetAddresses(bool internal = false) const { return false; }
/** Upgrades the wallet to the specified version */
- virtual bool Upgrade(int prev_version, int new_version, bilingual_str& error) { return false; }
+ virtual bool Upgrade(int prev_version, int new_version, bilingual_str& error) { return true; }
virtual bool HavePrivateKeys() const { return false; }