Skip to content

Commit ec73b07

Browse files
achow101hebasto
authored andcommitted
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.
1 parent 28f2976 commit ec73b07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wallet/scriptpubkeyman.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class ScriptPubKeyMan
207207
virtual bool CanGetAddresses(bool internal = false) const { return false; }
208208

209209
/** Upgrades the wallet to the specified version */
210-
virtual bool Upgrade(int prev_version, int new_version, bilingual_str& error) { return false; }
210+
virtual bool Upgrade(int prev_version, int new_version, bilingual_str& error) { return true; }
211211

212212
virtual bool HavePrivateKeys() const { return false; }
213213

0 commit comments

Comments
 (0)