aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorAva Chow <github@achow101.com>2024-04-22 17:08:18 -0400
committerAva Chow <github@achow101.com>2024-05-16 15:03:13 -0400
commitd51fbab4b32d56765e8faab6ad01245fb259b0ca (patch)
tree63c106f4ec20b2c61c8f436acb38a5dfb130f0c2 /src/wallet/wallet.cpp
parent0b753156ce60c29efb2386954ba7555ad8f642f5 (diff)
downloadbitcoin-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.cpp5
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);