diff options
author | Ava Chow <github@achow101.com> | 2024-04-22 17:08:18 -0400 |
---|---|---|
committer | Ava Chow <github@achow101.com> | 2024-05-16 15:03:13 -0400 |
commit | d51fbab4b32d56765e8faab6ad01245fb259b0ca (patch) | |
tree | 63c106f4ec20b2c61c8f436acb38a5dfb130f0c2 /src/wallet/wallet.cpp | |
parent | 0b753156ce60c29efb2386954ba7555ad8f642f5 (diff) | |
download | bitcoin-d51fbab4b32d56765e8faab6ad01245fb259b0ca.tar.xz |
wallet, test: Be able to always swap BDB endianness
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 96c4397504..5a8df5790e 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -375,7 +375,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); |