Attempt aggressive caching
This commit is contained in:
parent
311eb6988c
commit
46da44d520
1 changed files with 2 additions and 6 deletions
|
@ -455,15 +455,11 @@ func (i *Indexer) getCoin(
|
||||||
m, ok := i.coinMap[coinIdentifier.Identifier]
|
m, ok := i.coinMap[coinIdentifier.Identifier]
|
||||||
i.coinMapMutex.RUnlock()
|
i.coinMapMutex.RUnlock()
|
||||||
if ok {
|
if ok {
|
||||||
fmt.Println("used cache", coinIdentifier.Identifier)
|
|
||||||
return m.Coin, m.Account, nil
|
return m.Coin, m.Account, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return i.coinStorage.GetCoinTransactional(
|
// THis is SUPER dangerous (won't survive restart)
|
||||||
ctx,
|
return nil, nil, storage.ErrCoinNotFound
|
||||||
dbTx,
|
|
||||||
coinIdentifier,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *Indexer) findCoin(
|
func (i *Indexer) findCoin(
|
||||||
|
|
Loading…
Reference in a new issue