Error if writing a wallet fails during privkey import.

This commit is contained in:
Josh Rickmar 2013-12-16 09:12:25 -05:00
parent 75d3a77106
commit 399f91bba2

View file

@ -357,6 +357,7 @@ func (a *Account) ImportWIFPrivateKey(wif string, bs *wallet.BlockStamp) (string
a.mtx.Unlock()
if err := a.writeDirtyToDisk(); err != nil {
log.Errorf("cannot write dirty wallet: %v", err)
return "", fmt.Errorf("import failed: cannot write wallet: %v", err)
}
// Associate the imported address with this account.