From 573bcd75d7b65ff02aaeea40d6f870a9c0bc7490 Mon Sep 17 00:00:00 2001 From: pablomartin4btc Date: Tue, 13 May 2025 12:37:53 -0300 Subject: [PATCH] wallet, refactor: Remove unused SetupGeneration SetupGeneration was supposed to be the function that all SPKMs used to setup automatic generation, but it didn't work out that way and ended up being legacy only. It should be deleted at this point. --- src/wallet/scriptpubkeyman.h | 6 ------ src/wallet/wallet.cpp | 1 - 2 files changed, 7 deletions(-) diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h index e41ab6d669d..9ecc6084596 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -112,12 +112,6 @@ public: */ virtual std::vector MarkUnusedAddresses(const CScript& script) { return {}; } - /** Sets up the key generation stuff, i.e. generates new HD seeds and sets them as active. - * Returns false if already setup or setup fails, true if setup is successful - * Set force=true to make it re-setup if already setup, used for upgrades - */ - virtual bool SetupGeneration(bool force = false) { return false; } - /* Returns true if HD is enabled */ virtual bool IsHDEnabled() const { return false; } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index af1a20dacb5..bdfe8d66592 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2870,7 +2870,6 @@ std::shared_ptr CWallet::Create(WalletContext& context, const std::stri if ((wallet_creation_flags & WALLET_FLAG_EXTERNAL_SIGNER) || !(wallet_creation_flags & (WALLET_FLAG_DISABLE_PRIVATE_KEYS | WALLET_FLAG_BLANK_WALLET))) { walletInstance->SetupDescriptorScriptPubKeyMans(); - // SetupDescriptorScriptPubKeyMans already calls SetupGeneration for us so we don't need to call SetupGeneration separately } if (chain) {