OSDN Git Service

Don't create empty transactions when reading corrupted wallet
authormonacoinproject <monacoinproject@gmail.com>
Sun, 6 Apr 2014 15:12:06 +0000 (00:12 +0900)
committermonacoinproject <monacoinproject@gmail.com>
Sun, 6 Apr 2014 15:12:06 +0000 (00:12 +0900)
commit7c914f76b41a1fd6286f09cdfb1a3f820d791b3b
tree8bf8386d59f714c818fabf5fcab0a3c821ba4328
parent51bd2b791b7fc2c85978e32debcae305c8841fa1
Don't create empty transactions when reading corrupted wallet

The current transaction loading code is not exception safe.
An exception during deserialization causes an empty transaction
to be left behind in the wallet.

Fix this by building the transaction separately and adding
it only to the wallet at the end.

Fixes #3333.
src/walletdb.cpp