Skip to content

Commit

Permalink
removes unused first height field from LN builder
Browse files Browse the repository at this point in the history
This field reads the first height of an epoch, which may be unavailable
if the node is using Dynamic Bootstrap.
  • Loading branch information
jordanschalm committed Dec 19, 2024
1 parent 0507f92 commit 673f250
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 673f250

Please sign in to comment.