aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-06-09 19:22:16 +0800
committerobscuren <geffobscura@gmail.com>2015-06-09 19:24:32 +0800
commit190c1b688afa1b834ba1ccd7d0b7501bfaedbd18 (patch)
treee860903e26e7c4f102f3a67c47a7038576574733 /core
parent11f65cf885317d6c355b4c4a8d7420bcb82839d1 (diff)
downloaddexon-190c1b688afa1b834ba1ccd7d0b7501bfaedbd18.tar
dexon-190c1b688afa1b834ba1ccd7d0b7501bfaedbd18.tar.gz
dexon-190c1b688afa1b834ba1ccd7d0b7501bfaedbd18.tar.bz2
dexon-190c1b688afa1b834ba1ccd7d0b7501bfaedbd18.tar.lz
dexon-190c1b688afa1b834ba1ccd7d0b7501bfaedbd18.tar.xz
dexon-190c1b688afa1b834ba1ccd7d0b7501bfaedbd18.tar.zst
dexon-190c1b688afa1b834ba1ccd7d0b7501bfaedbd18.zip
core: skip genesis block for reprocess. Closes #1202
Diffstat (limited to 'core')
-rw-r--r--core/filter.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/core/filter.go b/core/filter.go
index 2ca57da65..fcdf68dd0 100644
--- a/core/filter.go
+++ b/core/filter.go
@@ -1,6 +1,7 @@
package core
import (
+ "fmt"
"math"
"github.com/ethereum/go-ethereum/common"
@@ -75,15 +76,19 @@ func (self *Filter) Find() state.Logs {
var (
logs state.Logs
block = self.eth.ChainManager().GetBlockByNumber(latestBlockNo)
- quit bool
)
- for i := 0; !quit && block != nil; i++ {
+
+done:
+ for i := 0; block != nil; i++ {
+ fmt.Println(block.NumberU64() == 0)
// Quit on latest
switch {
- case block.NumberU64() == earliestBlockNo, block.NumberU64() == 0:
- quit = true
+ case block.NumberU64() == 0:
+ break done
+ case block.NumberU64() == earliestBlockNo:
+ break done
case self.max <= len(logs):
- break
+ break done
}
// Use bloom filtering to see if this block is interesting given the