Closed fmlwlher closed 6 years ago
@yilugit @Clairvoyant1236
+1
@Clairvoyant1236 any feedback?
@yilugit Code looks good to me. I'm simulating crashes to see if the backup file stores the original wallet file correctly. Will merge it once I'm done with testing tomorrow.
pay attention to the commit msg next time @fmlwlher
wallet.dat file is vulnerable if client crashes. #29
For now each time a new block is produced the wallet.dat file is updated. However, this design is vulnerable in the case when the client crashes the private key stored in the wallet file may be lost. There are two solutions to this issue:
decouple wallet.dat from blockchain read/write. backup wallet file each time a new block is produced.