OSDN Git Service
(root)
/
bytom
/
vapor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5a3034
)
fix the roll back dead lock (#446)
author
Paladz
<yzhu101@uottawa.ca>
Sat, 23 Nov 2019 02:33:10 +0000
(10:33 +0800)
committer
GitHub
<noreply@github.com>
Sat, 23 Nov 2019 02:33:10 +0000
(10:33 +0800)
protocol/protocol.go
patch
|
blob
|
history
diff --git
a/protocol/protocol.go
b/protocol/protocol.go
index
b67194a
..
2ce9a1e
100644
(file)
--- a/
protocol/protocol.go
+++ b/
protocol/protocol.go
@@
-241,7
+241,7
@@
func (c *Chain) syncProtocolStatus(subProtocol Protocoler) error {
protocolHeight, protocolHash = block.Height-1, &block.PreviousBlockHash
}
- for height := protocolHeight + 1; height <= c.
BestBlockHeight()
; height++ {
+ for height := protocolHeight + 1; height <= c.
bestBlockHeader.Height
; height++ {
block, err := c.GetBlockByHeight(height)
if err != nil {
return errors.Wrap(err, subProtocol.Name(), "can't get block by height in chain")