fix: only call VerifyStates if not api only (#68)

This commit is contained in:
gazenw
2024-10-15 17:58:51 +07:00
committed by GitHub
parent 3ff73a99f8
commit 8883c24c77

View File

@@ -67,10 +67,11 @@ func New(injector do.Injector) (indexer.IndexerWorker, error) {
}
processor := NewProcessor(runesDg, indexerInfoDg, bitcoinClient, conf.Network, reportingClient, cleanupFuncs)
if !conf.APIOnly {
if err := processor.VerifyStates(ctx); err != nil {
return nil, errors.WithStack(err)
}
}
// Mount API
apiHandlers := lo.Uniq(conf.Modules.Runes.APIHandlers)
for _, handler := range apiHandlers {