4

I recently ran into an issue with an unsafe shutdown corruption on an NTFS partition in such a way that the files all existed, but chkdsk had to be run to verify some non-essential files.

My peers.dat file was the only file chkdsk complained about, but I verified my blockchain to be sure. How can I ensure my private keys in my current wallet.dat match the ones in my backup? I don't believe it is corrupt (At least Bitcoin-QT hasn't complained yet), but I'd rather be safe.

3 Answers 3

2

You can use the dumpwallet command and export the private keys to a text file. Do this for both wallets and then compare the text files. You should see the same addresses and private keys. If you do not, then something has gotten corrupted.

0

If you can sign and verify a message with every address, you're 100% sure as signing requires knowledge of the correct private key. https://i.sstatic.net/ttegX.jpg

You can do the verification with another client not holding your keys if that makes you feel more certain.

2
  • This raises the question of how to tell which addresses you should check. Commented Feb 20, 2017 at 19:19
  • @NateEldredge listunspent in the debug console will tell you which addresses have utxos sent to them.
    – Abdussamad
    Commented Aug 2, 2018 at 7:54
0

I wouldn't take any chances and just move my funds to a new wallet. Starting bitcoin core without a wallet.dat file in the data directory should force it to generate a new wallet. Then you just send from the old wallet to an address in the new one.

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.