diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-11-03 16:02:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-03 16:02:33 +0800 |
commit | 66bcd6aa343f29e9b4addcfcb9934af15a24a432 (patch) | |
tree | c24db2619cce112ecd520198d6803f5fb0f4f89e /core/agreement-state.go | |
parent | 9c6a00c92d7ab492a1dfe9565228736150df821d (diff) | |
download | dexon-consensus-66bcd6aa343f29e9b4addcfcb9934af15a24a432.tar dexon-consensus-66bcd6aa343f29e9b4addcfcb9934af15a24a432.tar.gz dexon-consensus-66bcd6aa343f29e9b4addcfcb9934af15a24a432.tar.bz2 dexon-consensus-66bcd6aa343f29e9b4addcfcb9934af15a24a432.tar.lz dexon-consensus-66bcd6aa343f29e9b4addcfcb9934af15a24a432.tar.xz dexon-consensus-66bcd6aa343f29e9b4addcfcb9934af15a24a432.tar.zst dexon-consensus-66bcd6aa343f29e9b4addcfcb9934af15a24a432.zip |
core: Fix fork vote (#290)
Diffstat (limited to 'core/agreement-state.go')
-rw-r--r-- | core/agreement-state.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/agreement-state.go b/core/agreement-state.go index 77569d5..fe329f8 100644 --- a/core/agreement-state.go +++ b/core/agreement-state.go @@ -118,9 +118,9 @@ func newCommitState(a *agreementData) *commitState { func (s *commitState) state() agreementStateType { return stateCommit } func (s *commitState) clocks() int { return 2 } func (s *commitState) nextState() (agreementState, error) { - hash, ok := s.a.countVote(s.a.period, types.VotePreCom) s.a.lock.Lock() defer s.a.lock.Unlock() + hash, ok := s.a.countVoteNoLock(s.a.period, types.VotePreCom) if ok && hash != skipBlockHash { s.a.lockValue = hash s.a.lockRound = s.a.period |