A confused user was trying to use importwallet on a wallet.dat directly. It gave no error message.
Perhaps we want an error to be output when nothing is imported, re-iterating that it needs to be a file outputted from dumpwallet?
A confused user was trying to use importwallet on a wallet.dat directly. It gave no error message.
Perhaps we want an error to be output when nothing is imported, re-iterating that it needs to be a file outputted from dumpwallet?
Looks to me too like a bug (from user's perspective) that needs to be fixed.
$ src/bitcoin-cli -testnet listwallets
[
""
]
$ src/bitcoin-cli -testnet importwallet dsadas
error code: -8
error message:
Cannot open wallet dump file
$ src/bitcoin-cli -testnet importwallet /dev/null
$ src/bitcoin-cli -testnet listwallets
[
""
]
Perhaps it should make sure it sees # Wallet dump created by Bitcoin at the beginning of the file?
Perhaps it could check instead if there was something meaningful at all to import and return result, like number of keys imported or warning about nothing imported or something.
We are not adding new features to the legacy wallet now.