Skip to content

Commit

Permalink
Take in tick sleep in StartClientless
Browse files Browse the repository at this point in the history
  • Loading branch information
rbajollari committed Feb 21, 2024
1 parent 0e54161 commit d59f6c1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions oracle/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,13 @@ func (o *Oracle) Start(ctx context.Context) error {
}
}

// Starts oracle process without a client for running on an Ojo node without submitting
// prevotes and votes.
func (o *Oracle) StartClientless(ctx context.Context, params oracletypes.Params) error {
// Starts oracle process without a client for running on an Ojo node that runs a
// price feeder natively.
func (o *Oracle) StartClientless(
ctx context.Context,
params oracletypes.Params,
tickSleep time.Duration,
) error {
o.paramCache.UpdateParamCache(0, params, nil)

for {
Expand All @@ -192,7 +196,7 @@ func (o *Oracle) StartClientless(ctx context.Context, params oracletypes.Params)
telemetry.MeasureSince(startTime, "runtime", "clientless tick")
telemetry.IncrCounter(1, "new", "clientless tick")

time.Sleep(tickerSleep)
time.Sleep(tickSleep)
}
}
}
Expand Down

0 comments on commit d59f6c1

Please sign in to comment.