diff --git a/chain/index/msgindex.go b/chain/index/msgindex.go index 1c77612d7..64dfcac67 100644 --- a/chain/index/msgindex.go +++ b/chain/index/msgindex.go @@ -332,14 +332,18 @@ func (x *msgIndex) processHeadChanges(ctx context.Context) error { for _, hc := range pend { for _, ts := range hc.rev { if err := x.doRevert(ctx, tx, ts); err != nil { - tx.Rollback() //nolint + if err := tx.Rollback(); err != nil { + log.Errorf("error rolling back transaction: %s", err) + } return xerrors.Errorf("error reverting %s: %w", ts, err) } } for _, ts := range hc.app { if err := x.doApply(ctx, tx, ts); err != nil { - tx.Rollback() //nolint + if err := tx.Rollback(); err != nil { + log.Errorf("error rolling back transaction: %s", err) + } return xerrors.Errorf("error applying %s: %w", ts, err) } }