Skip to content

Commit

Permalink
remove old lastProcessedTick logic from store
Browse files Browse the repository at this point in the history
  • Loading branch information
0xluk committed Sep 25, 2024
1 parent 20af975 commit c13501b
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,26 +300,6 @@ func (s *PebbleStore) GetLastProcessedTick(ctx context.Context) (*protobuff.Proc
}
defer closer.Close()

// handle old data format, to be removed in the future
if len(value) == 8 {
tickNumber := uint32(binary.LittleEndian.Uint64(value))
ticksPerEpoch, err := s.GetLastProcessedTicksPerEpoch(ctx)
if err != nil {
return nil, errors.Wrap(err, "getting last processed ticks per epoch")
}
var epoch uint32
for e, tick := range ticksPerEpoch {
if tick == tickNumber {
epoch = e
break
}
}
return &protobuff.ProcessedTick{
TickNumber: tickNumber,
Epoch: epoch,
}, nil
}

var lpt protobuff.ProcessedTick
if err := proto.Unmarshal(value, &lpt); err != nil {
return nil, errors.Wrap(err, "unmarshalling lpt to protobuff type")
Expand Down

0 comments on commit c13501b

Please sign in to comment.