diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-10-16 16:02:38 +0800 |
---|---|---|
committer | Wei-Ning Huang <aitjcize@gmail.com> | 2018-10-16 16:02:38 +0800 |
commit | fe0f16007f45232e40320f7b6d9f6f42af40c685 (patch) | |
tree | b0311b4cd4957c153d1040b6ab3762395b0498e8 /core/agreement.go | |
parent | bcf7d396322efae599d03ad7948500e01104e3fb (diff) | |
download | dexon-consensus-fe0f16007f45232e40320f7b6d9f6f42af40c685.tar.gz dexon-consensus-fe0f16007f45232e40320f7b6d9f6f42af40c685.tar.zst dexon-consensus-fe0f16007f45232e40320f7b6d9f6f42af40c685.zip |
core: Fix corner cases (#211)
* leader selector will choose smaller hash if distance to crs is the same
* Set initial value of aID in BA before start
Diffstat (limited to 'core/agreement.go')
-rw-r--r-- | core/agreement.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/agreement.go b/core/agreement.go index aa1d1dc..1b995e7 100644 --- a/core/agreement.go +++ b/core/agreement.go @@ -19,6 +19,7 @@ package core import ( "fmt" + "math" "sync" "sync/atomic" "time" @@ -126,7 +127,9 @@ func newAgreement( candidateBlock: make(map[common.Hash]*types.Block), authModule: authModule, } - agreement.restart(notarySet, types.Position{}) + agreement.restart(notarySet, types.Position{ + ChainID: math.MaxUint32, + }) return agreement } |