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
|
||||
|
||||
err = w.Manager.SetSyncedTo(addrmgrNs, &bs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = w.TxStore.Rollback(txmgrNs, b.Height)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue