aboutsummaryrefslogtreecommitdiffstats
path: root/les
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-04-07 16:03:11 +0800
committerGitHub <noreply@github.com>2017-04-07 16:03:11 +0800
commitcc13d576f07fb6803e09fb42880591a67b8b0ef6 (patch)
tree6b2371c34416e3697443d836aab3a1f7fc32e77a /les
parent71fdaa42386173da7bfa13f1728c394aeeb4eb01 (diff)
parent158d603528d2ba36b633a8f22a2bff8329f69717 (diff)
downloadgo-tangerine-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar
go-tangerine-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar.gz
go-tangerine-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar.bz2
go-tangerine-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar.lz
go-tangerine-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar.xz
go-tangerine-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar.zst
go-tangerine-cc13d576f07fb6803e09fb42880591a67b8b0ef6.zip
Merge pull request #13870 from karalabe/miners-fixes
all: clean up various error handling in core and the miner
Diffstat (limited to 'les')
-rw-r--r--les/fetcher.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/les/fetcher.go b/les/fetcher.go
index 353e91932..a294d00d5 100644
--- a/les/fetcher.go
+++ b/les/fetcher.go
@@ -24,6 +24,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/mclock"
+ "github.com/ethereum/go-ethereum/consensus"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/light"
@@ -498,7 +499,7 @@ func (f *lightFetcher) processResponse(req fetchRequest, resp fetchResponse) boo
headers[int(req.amount)-1-i] = header
}
if _, err := f.chain.InsertHeaderChain(headers, 1); err != nil {
- if err == core.BlockFutureErr {
+ if err == consensus.ErrFutureBlock {
return true
}
log.Debug("Failed to insert header chain", "err", err)