If you use both mainnet and testnet3 on the same machine, in default configuration testnet3 directory is under mainnet Bitcoin datadir. If you have also testnet wallet there (testnet3/wallet.dat file), it will show testnet3 directory in bitcoin-cli listwalletdir and "File > Open Wallet" list in GUI and actually allow to open it in mainnet. Don't think this is the expected behaviour.
Bitcoin Core on mainnet shows testnet3 dir as a wallet to open and allows opening it #16107
issue kristapsk opened this issue on May 27, 2019-
kristapsk commented at 8:26 PM on May 27, 2019: contributor
- fanquake added the label GUI on May 27, 2019
- fanquake added the label Wallet on May 27, 2019
-
promag commented at 10:33 PM on May 29, 2019: contributor
Maybe a quick fix is to blacklist these "internal" paths?
- fanquake removed the label GUI on May 29, 2019
-
nikitasius commented at 3:13 PM on June 5, 2019: none
after syncing from zero i got folder
walletsin mytestnet3folder while in config i had:walletdir=/path/to/my/testnet/wallet/folder/
upd: i use console 0.18.0, official, debian.
-
hg333 commented at 5:08 AM on August 22, 2021: contributor
After creating a wallet in testne3, I was able to load the wallet in mainnet(https://github.com/bitcoin/bitcoin/issues/12805), but the
./bitcoin-cli listwalletdirdidn't show any of the testnet3 wallets.Using version 22.0rc1, on Ubuntu 20.04
-
hebasto commented at 3:31 PM on October 8, 2021: member
If you use both mainnet and testnet3 on the same machine, in default configuration
testnet3directory is under mainnet Bitcoin datadir. If you have also testnet wallet there (testnet3/wallet.datfile), it will showtestnet3directory inbitcoin-cli listwalletdirand "File > Open Wallet" list in GUI and actually allow to open it in mainnet. Don't think this is the expected behaviour.I assume I don't have/use
walletssubdirectories that were introduced in #11466 (since v0.16.0). What if you move your wallets into the dedicated directories? -
maflcko commented at 10:30 AM on July 4, 2024: member
Is this fixed after #18554?
The "allows opening" part should be fixed by this. Not sure about the listing part.
However, if it wasn't fixed by now, my understanding is that this will also be fixed by migrating the BDB wallets to sqlite wallets, because they are placed in dedicated folders, and they can not exists as standalone files?
- maflcko closed this on May 6, 2025