From d59f6c10fce16ec61e4a34641d5876e6800770ed Mon Sep 17 00:00:00 2001 From: rbajollari Date: Wed, 21 Feb 2024 17:59:45 -0500 Subject: [PATCH] Take in tick sleep in StartClientless --- oracle/oracle.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/oracle/oracle.go b/oracle/oracle.go index 18da4ad..9312e30 100644 --- a/oracle/oracle.go +++ b/oracle/oracle.go @@ -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 { @@ -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) } } }