From 50aeb10bd8c87e81d6dff0d9e451cab58adb7096 Mon Sep 17 00:00:00 2001 From: Gui Iribarren Date: Mon, 9 Sep 2024 18:09:16 +0200 Subject: [PATCH] hotfix ReindexBlocks --- vochain/indexer/indexer.go | 6 ------ vochain/indexer/migrations/0019_dummy.sql | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 vochain/indexer/migrations/0019_dummy.sql diff --git a/vochain/indexer/indexer.go b/vochain/indexer/indexer.go index 9574bbf06..16f208ec3 100644 --- a/vochain/indexer/indexer.go +++ b/vochain/indexer/indexer.go @@ -455,14 +455,9 @@ func (idx *Indexer) ReindexBlocks(inTest bool) { return } - idxBlockCount, err := idx.CountBlocks() - if err != nil { - log.Warnf("indexer CountBlocks returned error: %s", err) - } log.Infow("start reindexing", "blockStoreBase", idx.App.Node.BlockStore().Base(), "blockStoreHeight", idx.App.Node.BlockStore().Height(), - "indexerBlockCount", idxBlockCount, ) queries := idx.blockTxQueries() for height := idx.App.Node.BlockStore().Base(); height <= idx.App.Node.BlockStore().Height(); height++ { @@ -515,7 +510,6 @@ func (idx *Indexer) ReindexBlocks(inTest bool) { log.Infow("finished reindexing", "blockStoreBase", idx.App.Node.BlockStore().Base(), "blockStoreHeight", idx.App.Node.BlockStore().Height(), - "indexerBlockCount", idxBlockCount, ) } diff --git a/vochain/indexer/migrations/0019_dummy.sql b/vochain/indexer/migrations/0019_dummy.sql new file mode 100644 index 000000000..358e65d31 --- /dev/null +++ b/vochain/indexer/migrations/0019_dummy.sql @@ -0,0 +1,5 @@ +-- +goose Up +-- intentionally does nothing + +-- This is a no-op command in SQLite, used just to have a valid SQL statement. +SELECT 1;