From 673f2503e3de02fc8253accc62bba71d13d8ed06 Mon Sep 17 00:00:00 2001 From: Jordan Schalm Date: Thu, 19 Dec 2024 13:22:21 -0700 Subject: [PATCH] removes unused first height field from LN builder This field reads the first height of an epoch, which may be unavailable if the node is using Dynamic Bootstrap. --- module/builder/collection/builder.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/module/builder/collection/builder.go b/module/builder/collection/builder.go index fb37de87362..38bb8895851 100644 --- a/module/builder/collection/builder.go +++ b/module/builder/collection/builder.go @@ -43,9 +43,8 @@ type Builder struct { log zerolog.Logger clusterEpoch uint64 // the operating epoch for this cluster // cache of values about the operating epoch which never change - refEpochFirstHeight uint64 // first height of this cluster's operating epoch - epochFinalHeight *uint64 // last height of this cluster's operating epoch (nil if epoch not ended) - epochFinalID *flow.Identifier // ID of last block in this cluster's operating epoch (nil if epoch not ended) + epochFinalHeight *uint64 // last height of this cluster's operating epoch (nil if epoch not ended) + epochFinalID *flow.Identifier // ID of last block in this cluster's operating epoch (nil if epoch not ended) } func NewBuilder( @@ -75,11 +74,6 @@ func NewBuilder( clusterEpoch: epochCounter, } - err := db.View(operation.RetrieveEpochFirstHeight(epochCounter, &b.refEpochFirstHeight)) - if err != nil { - return nil, fmt.Errorf("could not get epoch first height: %w", err) - } - for _, apply := range opts { apply(&b.config) }