0

I have repeated this process a few times, always with the same error.

In one terminal,

./bitcoind -testnet

in another

./bitcoind -testnet getnewaddress

mgj4Y8AvckxborhQzqFAhppcGVGFExqJvB

./bitcoind -testnet dumpwallet /path/to/testnet3/wallet.dat

error: {"code":-1,"message":"CDB() : can't open database file wallet.dat, error 22"}

./bitcoind -testnet stop

Bitcoin server stopping

In the original terminal,

libc++abi.dylib: terminate called throwing an exception Abort trap: 6

Then I type

./bitcoind -testnet

Error: wallet.dat corrupt, salvage failed

Anybody have an idea what is going on? I updated my bitcoin to the latest on github. I also searched for the error 22 but didn't find anything. I'm guessing CDB means corrupted database. I also looked in debug.log, but I didn't see anything weird.

I know it is the dumpwallet command that is breaking it, because when I omit it from this process, nothing breaks.

The same things happens on the mainnet, altho I have not tested it as much.

Am I using the dumpwallet command incorrectly?

1
  • The same things happens on the mainnet, altho I have not tested it as much.
    – user11721
    Commented Jan 3, 2014 at 10:10

1 Answer 1

6

The path you pass to dumpwallet is the filename of the dump.

If you pass the name of your wallet database itself (or any existing file, actually), it will get overwritten.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.