What is the file wallet.dat.rewrite?

2

1

In my %APPDATA%\Bitcoin folder (in Windows 7) I have a file called wallet.dat.rewrite

It was apparently last modified on 12th May 2011.

I don't think it's a file I created manually, so what is it?

Highly Irregular

Posted 2012-06-20T10:04:24.187

Reputation: 10 514

Answers

2

Sometimes the wallet file must be rewritten from scratch entirely (in particular when encrypthing it), to prevent unencrypted material to remain in old never-overwritten areas of the file. To do this, bitcoin writes a new file (wallet.dat.rewrite) and then renames it to wallet.dat. If this process is interrupted, it's possible that the wallet.dat.rewrite file remains. You can delete it safely.

Pieter Wuille

Posted 2012-06-20T10:04:24.187

Reputation: 54 032

2Actually you should delete it, since it possibly contains your unencrypted private keys, and could maybe be used by a thief to gain access to your bitcoins without knowing your wallet password.Chris Moore 2012-06-20T17:49:30.903

No, it is the file to which the rewritten version is written. It is not a copy of the old file.Pieter Wuille 2012-06-20T19:48:52.593

1Fair enough then. :) So is it possible that OP's wallet.dat file is still unencrypted since wallet.dat.rewrite wasn't renamed over top of it?Chris Moore 2012-06-21T00:16:05.350