mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-03 01:33:20 +02:00
Merge bitcoin/bitcoin#22461: wallet: Change ScriptPubKeyMan::Upgrade default to True
5012a7912eTest that descriptor wallet upgrade does nothing (Andrew Chow)48bd7d3b77Change ScriptPubKeyMan::Upgrade to default to return true (Andrew Chow) Pull request description: When adding a new ScriptPubKeyMan, it's likely that there will be nothing for `Upgrade` to do. If it is called (via `upgradewallet`), then it should do nothing, successfully. This PR changes the default `ScriptPubKeyMan::Upgrade` function so that it returns a success instead of failure when doing nothing. Fixes #22460 ACKs for top commit: jonatack: ACK5012a7912emeshcollider: utACK5012a7912eTree-SHA512: 578c6521e997f7bb5cc44be2cfe9e0a760b6bd4aa301026a6b8b3282e8757473e4cb9f68b2e79dacdc2b42dddae718450072e0a38817df205dfea177a74d7f3d
This commit is contained in:
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user