From 46da44d520bfe4afdc9d8e2cb8d04462ad8f1279 Mon Sep 17 00:00:00 2001 From: Patrick O'Grady Date: Tue, 27 Oct 2020 22:41:51 -0700 Subject: [PATCH] Attempt aggressive caching --- indexer/indexer.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/indexer/indexer.go b/indexer/indexer.go index a705baf..1d2eafa 100644 --- a/indexer/indexer.go +++ b/indexer/indexer.go @@ -455,15 +455,11 @@ func (i *Indexer) getCoin( m, ok := i.coinMap[coinIdentifier.Identifier] i.coinMapMutex.RUnlock() if ok { - fmt.Println("used cache", coinIdentifier.Identifier) return m.Coin, m.Account, nil } - return i.coinStorage.GetCoinTransactional( - ctx, - dbTx, - coinIdentifier, - ) + // THis is SUPER dangerous (won't survive restart) + return nil, nil, storage.ErrCoinNotFound } func (i *Indexer) findCoin(