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.
This commit is contained in:
Andrew Chow
2021-07-15 12:33:16 -04:00
parent a88fa1a555
commit 48bd7d3b77

View File

@@ -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; }