diff --git a/.gitignore b/.gitignore index 3ccd446..7a0197f 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ rabbitmq_data .vscode .env +.idea # Database files *.db \ No newline at end of file diff --git a/internal/services/bootstrap.go b/internal/services/bootstrap.go index e4a1e42..ec4068f 100644 --- a/internal/services/bootstrap.go +++ b/internal/services/bootstrap.go @@ -81,7 +81,7 @@ func (s *Service) processBlocksSequentially(ctx context.Context) *types.Error { } } - if dbErr := s.db.UpdateLastProcessedBbnHeight(ctx, uint64(i)); dbErr != nil { + if dbErr := s.db.UpdateLastProcessedBbnHeight(ctx, i); dbErr != nil { return types.NewError( http.StatusInternalServerError, types.InternalServiceError, diff --git a/internal/services/expiry_checker.go b/internal/services/expiry_checker.go index cac371b..af1ac90 100644 --- a/internal/services/expiry_checker.go +++ b/internal/services/expiry_checker.go @@ -28,7 +28,7 @@ func (s *Service) checkExpiry(ctx context.Context) *types.Error { ) } - expiredDelegations, err := s.db.FindExpiredDelegations(ctx, uint64(btcTip), s.cfg.Poller.ExpiredDelegationsLimit) + expiredDelegations, err := s.db.FindExpiredDelegations(ctx, btcTip, s.cfg.Poller.ExpiredDelegationsLimit) if err != nil { return types.NewInternalServiceError( fmt.Errorf("failed to find expired delegations: %w", err),