Skip to content

Commit

Permalink
Fix race condition in porserver
Browse files Browse the repository at this point in the history
Signed-off-by: Yilun <[email protected]>
  • Loading branch information
yilunzhang committed Oct 3, 2018
1 parent 1a10874 commit 6bdbd31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion por/porserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (ps *PorServer) AddSigChainFromTx(txn *transaction.Transaction) (bool, erro

height := porpkg.GetVoteForHeight()
ps.Lock()
ps.Unlock()
defer ps.Unlock()

if ps.minSigHash[height] == nil || bytes.Compare(porpkg.SigHash, ps.minSigHash[height]) < 0 {
ps.minSigHash[height] = porpkg.SigHash
Expand Down

0 comments on commit 6bdbd31

Please sign in to comment.