From: shenao78 Date: Wed, 30 Oct 2019 07:37:46 +0000 (+0800) Subject: fix dead lock X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=commitdiff_plain;h=579852b987298a923afd8ecd5f1a34abc9087e11 fix dead lock --- diff --git a/protocol/protocol.go b/protocol/protocol.go index 8dfd6591..59880a73 100644 --- a/protocol/protocol.go +++ b/protocol/protocol.go @@ -212,7 +212,7 @@ func (c *Chain) syncProtocolStatus(subProtocol Protocoler) error { return errors.Wrap(err, "failed on get sub protocol status") } - if protocolHeight == c.BestBlockHeight() && protocolHash == c.BestBlockHash() { + if protocolHeight == c.bestBlockHeader.Height && *protocolHash == c.bestBlockHeader.Hash() { return nil }