Skip to content

Commit

Permalink
Merge pull request #6829 from onflow/jord/v0.37/hf/rm-unused-builder-…
Browse files Browse the repository at this point in the history
…field

[v0.37] Removes unused first height field from LN builder
  • Loading branch information
jordanschalm authored Dec 19, 2024
2 parents 0507f92 + 673f250 commit bb11bfa
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 bb11bfa

Please sign in to comment.