config updates

This commit is contained in:
Mohamed Sohail 2024-05-07 15:58:30 +08:00
parent 1895ae3b24
commit 37110ea5db
Signed by: kamikazechaser
GPG Key ID: 7DD45520C01CD85D
6 changed files with 6 additions and 6 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
celo_tracker_blocks_db tracker_db
.vscode .vscode

View File

@ -8,7 +8,7 @@ address = ":5001"
ws_endpoint = "wss://forno.celo.org/ws" ws_endpoint = "wss://forno.celo.org/ws"
rpc_endpoint = "https://forno.celo.org" rpc_endpoint = "https://forno.celo.org"
testnet = false testnet = false
start_block = 25462593 start_block = 0
[bootstrap] [bootstrap]

View File

@ -15,7 +15,7 @@ type (
Add(string) Add(string)
Remove(string) Remove(string)
SetWatchableIndex(WatchableIndex) SetWatchableIndex(WatchableIndex)
IsWatchAbleIndex(string) bool IsWatchableIndex(string) bool
Size() int Size() int
} }

View File

@ -46,7 +46,7 @@ func (c *MapCache) SetWatchableIndex(watchableIndex WatchableIndex) {
c.watchableIndex = watchableIndex c.watchableIndex = watchableIndex
} }
func (c *MapCache) IsWatchAbleIndex(key string) bool { func (c *MapCache) IsWatchableIndex(key string) bool {
_, ok := c.watchableIndex[key] _, ok := c.watchableIndex[key]
return ok return ok
} }

View File

@ -55,7 +55,7 @@ func (h *IndexAddHandler) HandleLog(ctx context.Context, msg LogMessage, pub pub
}, },
} }
if h.cache.IsWatchAbleIndex(address.Hex()) { if h.cache.IsWatchableIndex(address.Hex()) {
h.cache.Add(address.Hex()) h.cache.Add(address.Hex())
} }

View File

@ -54,7 +54,7 @@ func (h *IndexRemoveHandler) HandleLog(ctx context.Context, msg LogMessage, pub
}, },
} }
if h.cache.IsWatchAbleIndex(address.Hex()) { if h.cache.IsWatchableIndex(address.Hex()) {
h.cache.Remove(address.Hex()) h.cache.Remove(address.Hex())
} }