mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
core/filtermaps: initialize indexer when chain head is available
This commit is contained in:
parent
624a5d8b23
commit
91a85de0d4
1 changed files with 5 additions and 0 deletions
|
|
@ -42,6 +42,11 @@ func (f *FilterMaps) indexerLoop() {
|
|||
|
||||
for !f.stop {
|
||||
if !f.indexedRange.initialized {
|
||||
if f.targetView.headNumber == 0 {
|
||||
// initialize when chain head is available
|
||||
f.processSingleEvent(true)
|
||||
continue
|
||||
}
|
||||
if err := f.init(); err != nil {
|
||||
log.Error("Error initializing log index", "error", err)
|
||||
// unexpected error; there is not a lot we can do here, maybe it
|
||||
|
|
|
|||
Loading…
Reference in a new issue