mirror of
https://github.com/grassrootseconomics/eth-tracker.git
synced 2025-04-26 01:51:02 +02:00
config updates
This commit is contained in:
parent
1895ae3b24
commit
37110ea5db
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
celo_tracker_blocks_db
|
tracker_db
|
||||||
.vscode
|
.vscode
|
@ -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]
|
||||||
|
2
internal/cache/cache.go
vendored
2
internal/cache/cache.go
vendored
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
internal/cache/map.go
vendored
2
internal/cache/map.go
vendored
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user