diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-11-15 12:05:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-15 12:05:30 +0800 |
commit | 7b68cc8fa60d91a7c6ed2f78dc851da48d1fc258 (patch) | |
tree | 31ea26a7e082e16f1091152f58a9bf04c5ba40b9 /core/consensus.go | |
parent | 07ca4b1c5b0c193d621d5fc62f10a4eb083ced39 (diff) | |
download | dexon-consensus-7b68cc8fa60d91a7c6ed2f78dc851da48d1fc258.tar dexon-consensus-7b68cc8fa60d91a7c6ed2f78dc851da48d1fc258.tar.gz dexon-consensus-7b68cc8fa60d91a7c6ed2f78dc851da48d1fc258.tar.bz2 dexon-consensus-7b68cc8fa60d91a7c6ed2f78dc851da48d1fc258.tar.lz dexon-consensus-7b68cc8fa60d91a7c6ed2f78dc851da48d1fc258.tar.xz dexon-consensus-7b68cc8fa60d91a7c6ed2f78dc851da48d1fc258.tar.zst dexon-consensus-7b68cc8fa60d91a7c6ed2f78dc851da48d1fc258.zip |
core: Fix issues in syncing mode (#329)
Diffstat (limited to 'core/consensus.go')
-rw-r--r-- | core/consensus.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/consensus.go b/core/consensus.go index 931b2db..a8fd3c8 100644 --- a/core/consensus.go +++ b/core/consensus.go @@ -839,6 +839,12 @@ func (con *Consensus) proposeEmptyBlock( // ProcessVote is the entry point to submit ont vote to a Consensus instance. func (con *Consensus) ProcessVote(vote *types.Vote) (err error) { + if vote.Position.ChainID >= uint32(len(con.baModules)) { + return nil + } + if isStop(con.baModules[vote.Position.ChainID].agreementID()) { + return nil + } v := vote.Clone() err = con.baModules[v.Position.ChainID].processVote(v) return err |