Skip to content

Commit

Permalink
Merge pull request #6828 from onflow/jord/hf/rm-unused-builder-field
Browse files Browse the repository at this point in the history
Removes unused first height field from LN builder
  • Loading branch information
jordanschalm authored Jan 10, 2025
2 parents 8ff124c + 04df99f commit 0803e0b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions module/builder/collection/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 0803e0b

Please sign in to comment.