wallet: catch and return error from rollback failure

This commit is contained in:
Olaoluwa Osuntokun 2018-08-13 18:46:05 -07:00
parent 1feb87e6ae
commit 1fbdc8c44b
No known key found for this signature in database
GPG key ID: 964EA263DD637C21

View file

@ -227,12 +227,15 @@ func (w *Wallet) disconnectBlock(dbtx walletdb.ReadWriteTx, b wtxmgr.BlockMeta)
} }
bs.Timestamp = header.Timestamp bs.Timestamp = header.Timestamp
err = w.Manager.SetSyncedTo(addrmgrNs, &bs) err = w.Manager.SetSyncedTo(addrmgrNs, &bs)
if err != nil { if err != nil {
return err return err
} }
err = w.TxStore.Rollback(txmgrNs, b.Height) err = w.TxStore.Rollback(txmgrNs, b.Height)
if err != nil {
return err
}
} }
} }