Questions:
- Should it be assumed if you're testing with bitcoincore you should always have a separate datadir per version/bin?
- Based on weirdness below, (not being able to list regtest wallets), does it seem like my current node is messed up? If yes, what should I do to recover? If no, what am I doing wrong?
Details:
I was running version v25.0 of bitcoincore from bitcoincore.org. I crated some wallets and did some testing. I then compiled from master/source bitcoin/bitcoin
and pointed to the same backend state/datadir that v25.0 was using. Later I switched back to running the binary v25.0.
I'm curious if that could be the reason for seeing weird things like this or if it's something else:
$ ./bitcoin-cli createwallet wallet_main
error code: -4
error message:
Wallet file verification failed. Failed to create database path '/btcdata/regtest/wallets/wallet_main'. Database already exists.
$ ./bitcoin-cli listwallets
[
]
$ ./bitcoin-cli createwallet wallet_main33
{
"name": "wallet_main33"
}
$ ./bitcoin-cli listwallets
[
"wallet_main33"
]
$ ./bitcoin-cli createwallet wallet_main
error code: -4
error message:
Wallet file verification failed. Failed to create database path '/btcdata/regtest/wallets/wallet_main'. Database already exists.
I was doing some testing on regtest a few days ago and created several wallets including a "wallet_main", it seems there is still some data of this and other regtest wallets, but they don't show up with the listwallets
command.
Am I doing something wrong to list the all the wallets? Is it maybe a bug? or did I perhaps mess up my node?
Additional notes:
Inside my /btcdata/regtest/wallets/
directory all my wallets look the same in term user/permissions the folder for the wallet names are 700, drwx------
, and the inner wallet.dat
's are 600, -rw-------
. I indeed have a /btcdata/regtest/wallets/wallet_main
dir.
-regtest
to thebitcoin-cli
command, so it can find the right data directory and config file sections. I'm surprised anything works at all without that.loadwallet
RPC to load existing wallets, if they're not set to auto loading. If that resolves it, I'll turn this into an answer.loadwallet
is what I need to do. I also see there is detailed explanation within bitcoin.conf to help people autoload various wallets. Also, bitcoin.conf set to run regtest viachain=regtest
so I don't need to put-regtest
it in every command. (I believe this is how it works?) Also doing this in bitcoin.conf: ``` # Options for regtest [regtest] # Options for regtest [regtest] rpcport=8332 fallbackfee=0.01 ``` You're good to turn your comment into an answer!