diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-29 20:00:24 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-29 20:00:24 +0800 |
commit | 735b029db95bf72c3105674c0f2b4f111e5ccdf5 (patch) | |
tree | d656426d54dbbdd2a187bf22e93ddc0ad9aaeece /eth/handler.go | |
parent | 764e81bf12bc45b00cec7db216e72d6396cf0c13 (diff) | |
download | dexon-735b029db95bf72c3105674c0f2b4f111e5ccdf5.tar dexon-735b029db95bf72c3105674c0f2b4f111e5ccdf5.tar.gz dexon-735b029db95bf72c3105674c0f2b4f111e5ccdf5.tar.bz2 dexon-735b029db95bf72c3105674c0f2b4f111e5ccdf5.tar.lz dexon-735b029db95bf72c3105674c0f2b4f111e5ccdf5.tar.xz dexon-735b029db95bf72c3105674c0f2b4f111e5ccdf5.tar.zst dexon-735b029db95bf72c3105674c0f2b4f111e5ccdf5.zip |
core: return the index of the block that failed when inserting a chain
Diffstat (limited to 'eth/handler.go')
-rw-r--r-- | eth/handler.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/eth/handler.go b/eth/handler.go index 61149049e..2dd4c74db 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -376,7 +376,7 @@ func (self *ProtocolManager) handleMsg(p *peer) error { // if the parent exists we process the block and propagate to our peers // if the parent does not exists we delegate to the downloader. if self.chainman.HasBlock(request.Block.ParentHash()) { - if err := self.chainman.InsertChain(types.Blocks{request.Block}); err != nil { + if _, err := self.chainman.InsertChain(types.Blocks{request.Block}); err != nil { // handle error return nil } |