diff --git a/chain/messagepool/check.go b/chain/messagepool/check.go index 17829057a0e..fdec910c4ea 100644 --- a/chain/messagepool/check.go +++ b/chain/messagepool/check.go @@ -35,6 +35,7 @@ func (mp *MessagePool) CheckPendingMessages(ctx context.Context, from address.Ad mp.lk.RLock() mset, ok, err := mp.getPendingMset(ctx, from) if err != nil { + mp.lk.RUnlock() return nil, xerrors.Errorf("errored while getting pending mset: %w", err) } if ok { @@ -70,6 +71,7 @@ func (mp *MessagePool) CheckReplaceMessages(ctx context.Context, replace []*type msgMap[m.From] = mmap mset, ok, err := mp.getPendingMset(ctx, m.From) if err != nil { + mp.lk.RUnlock() return nil, xerrors.Errorf("errored while getting pending mset: %w", err) } if ok { @@ -153,6 +155,7 @@ func (mp *MessagePool) checkMessages(ctx context.Context, msgs []*types.Message, mp.lk.RLock() mset, ok, err := mp.getPendingMset(ctx, m.From) if err != nil { + mp.lk.RUnlock() return nil, xerrors.Errorf("errored while getting pending mset: %w", err) } if ok && !interned {