use minimum of 2 workers

This commit is contained in:
vyzo 2022-01-25 21:37:48 +02:00
parent 8e01e73de4
commit 10f2445a99

View File

@ -711,6 +711,9 @@ func (s *SplitStore) walkChain(ts *types.TipSet, inclState, inclMsgs abi.ChainEp
if workers > runtime.NumCPU()/2 {
workers = runtime.NumCPU() / 2
}
if workers < 2 {
workers = 2
}
workch := make(chan cid.Cid, len(walking))
for _, c := range walking {