fix deadlock

This commit is contained in:
vyzo 2020-09-11 21:40:25 +03:00
parent bf1036c78f
commit b78fe0b898

View File

@ -59,11 +59,9 @@ func (mp *MessagePool) pruneMessages(ctx context.Context, ts *types.TipSet) erro
}
// we also never prune locally published messages
mp.lk.Lock()
for actor := range mp.localAddrs {
protected[actor] = struct{}{}
}
mp.lk.Unlock()
// Collect all messages to track which ones to remove and create chains for block inclusion
pruneMsgs := make(map[cid.Cid]*types.SignedMessage, mp.currentSize)