diff options
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 8f4171eb15..8a79cf730b 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -5,9 +5,7 @@ #include <wallet/wallet.h> -#if defined(HAVE_CONFIG_H) -#include <config/bitcoin-config.h> -#endif +#include <config/bitcoin-config.h> // IWYU pragma: keep #include <addresstype.h> #include <blockfilter.h> #include <chain.h> @@ -375,7 +373,12 @@ std::shared_ptr<CWallet> CreateWallet(WalletContext& context, const std::string& uint64_t wallet_creation_flags = options.create_flags; const SecureString& passphrase = options.create_passphrase; + ArgsManager& args = *Assert(context.args); + if (wallet_creation_flags & WALLET_FLAG_DESCRIPTORS) options.require_format = DatabaseFormat::SQLITE; + else if (args.GetBoolArg("-swapbdbendian", false)) { + options.require_format = DatabaseFormat::BERKELEY_SWAP; + } // Indicate that the wallet is actually supposed to be blank and not just blank to make it encrypted bool create_blank = (wallet_creation_flags & WALLET_FLAG_BLANK_WALLET); |