Skip to content

Commit 3054fd4

Browse files
committed
Merge pull request #1215 from obscuren/issue1202
core: skip genesis block for reprocess. Closes #1202
2 parents 7da8ebd + 190c1b6 commit 3054fd4

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

core/filter.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package core
22

33
import (
4+
"fmt"
45
"math"
56

67
"github.com/ethereum/go-ethereum/common"
@@ -75,15 +76,19 @@ func (self *Filter) Find() state.Logs {
7576
var (
7677
logs state.Logs
7778
block = self.eth.ChainManager().GetBlockByNumber(latestBlockNo)
78-
quit bool
7979
)
80-
for i := 0; !quit && block != nil; i++ {
80+
81+
done:
82+
for i := 0; block != nil; i++ {
83+
fmt.Println(block.NumberU64() == 0)
8184
// Quit on latest
8285
switch {
83-
case block.NumberU64() == earliestBlockNo, block.NumberU64() == 0:
84-
quit = true
86+
case block.NumberU64() == 0:
87+
break done
88+
case block.NumberU64() == earliestBlockNo:
89+
break done
8590
case self.max <= len(logs):
86-
break
91+
break done
8792
}
8893

8994
// Use bloom filtering to see if this block is interesting given the

0 commit comments

Comments
 (0)