Skip to content

Commit

Permalink
fix eth_subscribe (#2801)
Browse files Browse the repository at this point in the history
  • Loading branch information
gelfand authored and mandrigin committed Oct 14, 2021
1 parent 8db53a8 commit dbc14fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions eth/stagedsync/stage_finish.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ func PruneFinish(u *PruneState, tx kv.RwTx, cfg FinishCfg, ctx context.Context)
}

func NotifyNewHeaders(ctx context.Context, finishStageBeforeSync uint64, finishStageAfterSync uint64, unwindTo *uint64, notifier ChainEventNotifier, tx kv.Tx) error {

if notifier == nil {
log.Trace("RPC Daemon notification channel not set. No headers notifications will be sent")
return nil
Expand All @@ -146,6 +145,7 @@ func NotifyNewHeaders(ctx context.Context, finishStageBeforeSync uint64, finishS
}
notifyFrom = finishStageAfterSync - heightSpan
}
notifyFrom++

startKey := make([]byte, reflect.TypeOf(notifyFrom).Size()+32)
var notifyTo uint64
Expand All @@ -167,7 +167,6 @@ func NotifyNewHeaders(ctx context.Context, finishStageBeforeSync uint64, finishS
return err
}

log.Info("RPC Daemon notified of new headers", "from", notifyFrom, "to", notifyTo)
log.Info("RPC Daemon notified of new headers", "from", notifyFrom-1, "to", notifyTo)
return nil

}

0 comments on commit dbc14fe

Please sign in to comment.