提交 3054fd48 编写于 作者: J Jeffrey Wilcke

Merge pull request #1215 from obscuren/issue1202

core: skip genesis block for reprocess. Closes #1202
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册