mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
wallet: have ScriptPubKeyMan::Upgrade check against the new version
Instead of using CanSupportFeature and relying on nWalletMaxVersion, take the new version we are upgrading to and use IsSupportedFeature with that and the previous wallet version.
This commit is contained in:
@@ -206,7 +206,7 @@ public:
|
||||
virtual bool CanGetAddresses(bool internal = false) const { return false; }
|
||||
|
||||
/** Upgrades the wallet to the specified version */
|
||||
virtual bool Upgrade(int prev_version, bilingual_str& error) { return false; }
|
||||
virtual bool Upgrade(int prev_version, int new_version, bilingual_str& error) { return false; }
|
||||
|
||||
virtual bool HavePrivateKeys() const { return false; }
|
||||
|
||||
@@ -371,7 +371,7 @@ public:
|
||||
|
||||
bool SetupGeneration(bool force = false) override;
|
||||
|
||||
bool Upgrade(int prev_version, bilingual_str& error) override;
|
||||
bool Upgrade(int prev_version, int new_version, bilingual_str& error) override;
|
||||
|
||||
bool HavePrivateKeys() const override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user