aboutsummaryrefslogtreecommitdiffstats
path: root/core/blockchain.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-05-25 00:49:54 +0800
committerFelix Lange <fjl@twurst.com>2016-05-25 08:02:51 +0800
commitca18202eb9a94de1d4b51c1572fa74edfa2773bf (patch)
tree7c56ac08aa0feb3221241959ed2eeff1ef1ff097 /core/blockchain.go
parent5bcdbb1ce4ac576cab778e9772fabdcc7cbfbb5f (diff)
downloadgo-tangerine-ca18202eb9a94de1d4b51c1572fa74edfa2773bf.tar.gz
go-tangerine-ca18202eb9a94de1d4b51c1572fa74edfa2773bf.tar.zst
go-tangerine-ca18202eb9a94de1d4b51c1572fa74edfa2773bf.zip
eth: enable bad block reports
We used to have reporting of bad blocks, but it was disabled before the Frontier release. We need it back because users are usually unable to provide the full RLP data of a bad block when it occurs. A shortcoming of this particular implementation is that the origin peer is not tracked for blocks received during eth/63 sync. No origin peer info is still better than no report at all though.
Diffstat (limited to 'core/blockchain.go')
-rw-r--r--core/blockchain.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index 4598800d5..171a49e53 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -1117,15 +1117,12 @@ func (self *BlockChain) update() {
}
}
-// reportBlock reports the given block and error using the canonical block
-// reporting tool. Reporting the block to the service is handled in a separate
-// goroutine.
+// reportBlock logs a bad block error.
func reportBlock(block *types.Block, err error) {
if glog.V(logger.Error) {
glog.Errorf("Bad block #%v (%s)\n", block.Number(), block.Hash().Hex())
glog.Errorf(" %v", err)
}
- go ReportBlock(block, err)
}
// InsertHeaderChain attempts to insert the given header chain in to the local