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
(from parent 1:
56634c3
)
prevent double sign lock (#531)
author
Paladz
<yzhu101@uottawa.ca>
Fri, 3 Apr 2020 15:31:19 +0000
(23:31 +0800)
committer
GitHub
<noreply@github.com>
Fri, 3 Apr 2020 15:31:19 +0000
(23:31 +0800)
Co-authored-by: paladz <453256728@qq.com>
protocol/bbft.go
patch
|
blob
|
history
diff --git
a/protocol/bbft.go
b/protocol/bbft.go
index
06b4859
..
02accaf
100644
(file)
--- a/
protocol/bbft.go
+++ b/
protocol/bbft.go
@@
-206,7
+206,9
@@
func (c *Chain) ProcessBlockSignature(signature, xPub []byte, blockHash *bc.Hash
// SignBlockHeader signing the block if current node is consensus node
func (c *Chain) SignBlockHeader(blockHeader *types.BlockHeader) error {
+ c.cond.L.Lock()
_, err := c.signBlockHeader(blockHeader)
+ c.cond.L.Unlock()
return err
}