Skip to content

Commit

Permalink
fix last fetched cycle check
Browse files Browse the repository at this point in the history
  • Loading branch information
cryi committed Jun 21, 2024
1 parent d740cef commit 9e84ec4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion constants/version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package constants

const (
VERSION = "0.0.7"
VERSION = "0.0.8"
CODENAME = "ogun"
)
2 changes: 1 addition & 1 deletion store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (s *Store) IsDelegationStateAvailable(delegate tezos.Address, cycle int64)
func (s *Store) GetLastFetchedCycle() (int64, error) {
var cycle int64

if err := s.db.Select("cycle").Order("cycle desc").First(&cycle).Error; err != nil {
if err := s.db.Model(&StoredDelegationState{}).Select("cycle").Order("cycle desc").First(&cycle).Error; err != nil {
if err == gorm.ErrRecordNotFound {
return 0, nil
}
Expand Down

0 comments on commit 9e84ec4

Please sign in to comment.