From db842ac54e41a104dc47b618744990d84b7e04cf Mon Sep 17 00:00:00 2001 From: gop Date: Fri, 26 Apr 2024 11:09:08 -0500 Subject: [PATCH] bugfix: Stop the etx collection if the slice was not created yet --- core/slice.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/slice.go b/core/slice.go index 7156f33221..e684b23c22 100644 --- a/core/slice.go +++ b/core/slice.go @@ -772,6 +772,13 @@ func (sl *Slice) CollectNewlyConfirmedEtxs(block *types.WorkObject, location com return newlyConfirmedEtxs, subRollup, nil } + // Terminate the search if the slice to which the given block belongs was + // not activated yet + regions, zones := common.GetHierarchySizeForExpansionNumber(ancestor.ExpansionNumber()) + if location.Region() > int(regions) || location.Zone() > int(zones) { + return newlyConfirmedEtxs, subRollup, nil + } + // Terminate the search when we find a block produced by the same sub if ancestor.Location().SubIndex(nodeLocation) == location.SubIndex(nodeLocation) { return newlyConfirmedEtxs, subRollup, nil