diff --git a/chain/events/events_height.go b/chain/events/events_height.go index c8dd905d9b1..1fcff9e68f1 100644 --- a/chain/events/events_height.go +++ b/chain/events/events_height.go @@ -153,6 +153,7 @@ func (e *heightEvents) ChainAt(hnd HeightHandler, rev RevertHandler, confidence best, err := e.tsc.best() if err != nil { + e.lk.Unlock() return xerrors.Errorf("error getting best tipset: %w", err) } @@ -177,6 +178,7 @@ func (e *heightEvents) ChainAt(hnd HeightHandler, rev RevertHandler, confidence e.lk.Lock() best, err = e.tsc.best() if err != nil { + e.lk.Unlock() return xerrors.Errorf("error getting best tipset: %w", err) } bestH = best.Height()