From 5e8ae7498a014c32cc89a2f003a6fc329a87c2d6 Mon Sep 17 00:00:00 2001 From: vyzo Date: Thu, 13 Aug 2020 10:33:20 +0300 Subject: [PATCH] only adjust next chains if they have positve perf Signed-off-by: Jakub Sztandera --- chain/messagepool/selection.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chain/messagepool/selection.go b/chain/messagepool/selection.go index d1295afd4..43154a4b9 100644 --- a/chain/messagepool/selection.go +++ b/chain/messagepool/selection.go @@ -178,14 +178,14 @@ func (mp *MessagePool) selectMessagesOptimal(curTs, ts *types.TipSet, tq float64 curChain := chainDeps[i] curChain.merged = true // adjust the next chain for the parent, which is being merged - if next := curChain.next; next != nil { + if next := curChain.next; next != nil && next.effPerf > 0 { next.effPerf += next.parentOffset } result = append(result, curChain.msgs...) } chain.merged = true - if next := chain.next; next != nil { + if next := chain.next; next != nil && next.effPerf > 0 { next.effPerf += next.parentOffset } result = append(result, chain.msgs...)