Skip to content

Commit

Permalink
Fix empty tick check
Browse files Browse the repository at this point in the history
  • Loading branch information
LINCKODE committed Jul 29, 2024
1 parent 9f775b9 commit 32e366f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion validator/tick/empty_tick.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"google.golang.org/protobuf/proto"
)

var emptyTickData = &protobuff.TickData{}

func CalculateEmptyTicksForEpoch(ctx context.Context, ps *store.PebbleStore, epoch uint32) (uint32, error) {

epochs, err := ps.GetProcessedTickIntervals(ctx)
Expand Down Expand Up @@ -48,7 +50,7 @@ func CalculateEmptyTicksForEpoch(ctx context.Context, ps *store.PebbleStore, epo

func CheckIfTickIsEmptyProto(tickData *protobuff.TickData) bool {

if tickData == nil || proto.Equal(tickData, &protobuff.TickData{}) {
if tickData == nil || proto.Equal(tickData, emptyTickData) {
return true
}

Expand Down

0 comments on commit 32e366f

Please sign in to comment.