• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: 提交

Golang implemented sidechain for Bytom


Commit MetaInfo

修订版2658d9bd018529e0ba5112e2f4c27c0c68029316 (tree)
时间2019-11-22 19:59:51
作者paladz <453256728@qq.c...>
Commiterpaladz

Log Message

fix the roll back dead lock

更改概述

差异

--- a/protocol/protocol.go
+++ b/protocol/protocol.go
@@ -241,7 +241,7 @@ func (c *Chain) syncProtocolStatus(subProtocol Protocoler) error {
241241 protocolHeight, protocolHash = block.Height-1, &block.PreviousBlockHash
242242 }
243243
244- for height := protocolHeight + 1; height <= c.BestBlockHeight(); height++ {
244+ for height := protocolHeight + 1; height <= c.bestBlockHeader.Height; height++ {
245245 block, err := c.GetBlockByHeight(height)
246246 if err != nil {
247247 return errors.Wrap(err, subProtocol.Name(), "can't get block by height in chain")
Show on old repository browser