Skip to content

Commit

Permalink
fix add subscription logic (#1423)
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-malene authored Aug 6, 2023
1 parent 0aebb2d commit 2227721
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/enclave/events/subscription_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (s *SubscriptionManager) AddSubscription(id gethrpc.ID, encryptedSubscripti

startAt := subscription.Filter.FromBlock
// Set the subscription to start from the current head if a specific start is not specified
if startAt == nil || startAt.Int64() < 0 {
if startAt == nil || startAt.Int64() <= 0 {
head, err := s.storage.FetchHeadBatch()
if err != nil {
return fmt.Errorf("unable to read head batch to create subscription - %w", err)
Expand Down

0 comments on commit 2227721

Please sign in to comment.