Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes unused first height field from LN builder #6828

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading