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

fix issue in CreateDefaultLightClientUpdate function #14585

Merged
2 changes: 1 addition & 1 deletion beacon-chain/core/light-client/lightclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ func CreateDefaultLightClientUpdate(currentSlot primitives.Slot, attestedState s
}

var nextSyncCommitteeBranch [][]byte
if currentEpoch >= params.BeaconConfig().ElectraForkEpoch {
if attestedState.Version() >= version.Electra {
nextSyncCommitteeBranch = make([][]byte, fieldparams.SyncCommitteeBranchDepthElectra)
} else {
nextSyncCommitteeBranch = make([][]byte, fieldparams.SyncCommitteeBranchDepth)
Expand Down
2 changes: 1 addition & 1 deletion beacon-chain/db/kv/lightclient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ func createDefaultLightClientUpdate(currentSlot primitives.Slot, attestedState s
}

var nextSyncCommitteeBranch [][]byte
if currentEpoch >= params.BeaconConfig().ElectraForkEpoch {
if attestedState.Version() >= version.Electra {
nextSyncCommitteeBranch = make([][]byte, fieldparams.SyncCommitteeBranchDepthElectra)
} else {
nextSyncCommitteeBranch = make([][]byte, fieldparams.SyncCommitteeBranchDepth)
Expand Down
Loading