wallet: catch and return error from rollback failure
This commit is contained in:
parent
1feb87e6ae
commit
1fbdc8c44b
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue