diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-05-08 02:07:20 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-05-08 02:07:20 +0800 |
commit | 9d188f73b58ee1fe4bda00a9536bda4056755f2c (patch) | |
tree | f9f9361b8440865a890df900ea7f7986ba169098 /eth/handler.go | |
parent | 43901c92825389b694fb5488c520cf5122f022de (diff) | |
download | dexon-9d188f73b58ee1fe4bda00a9536bda4056755f2c.tar dexon-9d188f73b58ee1fe4bda00a9536bda4056755f2c.tar.gz dexon-9d188f73b58ee1fe4bda00a9536bda4056755f2c.tar.bz2 dexon-9d188f73b58ee1fe4bda00a9536bda4056755f2c.tar.lz dexon-9d188f73b58ee1fe4bda00a9536bda4056755f2c.tar.xz dexon-9d188f73b58ee1fe4bda00a9536bda4056755f2c.tar.zst dexon-9d188f73b58ee1fe4bda00a9536bda4056755f2c.zip |
eth, eth/downloader: make synchronize thread safe
Diffstat (limited to 'eth/handler.go')
-rw-r--r-- | eth/handler.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/handler.go b/eth/handler.go index 1e0663816..b2018f336 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -307,7 +307,7 @@ func (self *ProtocolManager) handleMsg(p *peer) error { // Attempt to insert the newly received by checking if the parent exists. // if the parent exists we process the block and propagate to our peers - // otherwise synchronise with the peer + // otherwise synchronize with the peer if self.chainman.HasBlock(request.Block.ParentHash()) { if _, err := self.chainman.InsertChain(types.Blocks{request.Block}); err != nil { glog.V(logger.Error).Infoln("removed peer (", p.id, ") due to block error") @@ -324,7 +324,7 @@ func (self *ProtocolManager) handleMsg(p *peer) error { } self.BroadcastBlock(hash, request.Block) } else { - go self.synchronise(p) + go self.synchronize(p) } default: return errResp(ErrInvalidMsgCode, "%v", msg.Code) |