aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-03-12 12:23:16 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:22 +0800
commit5d30e58203e27153c9b7a0dd23c349035e175f13 (patch)
treeb56b8dda0136fc81b1a60b7d73ada9b1b0ede79c /vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go
parent7c261cc567abbbef286b5b993b52d9c032c1d36f (diff)
downloadgo-tangerine-5d30e58203e27153c9b7a0dd23c349035e175f13.tar.gz
go-tangerine-5d30e58203e27153c9b7a0dd23c349035e175f13.tar.zst
go-tangerine-5d30e58203e27153c9b7a0dd23c349035e175f13.zip
vendor: sync to latest core and fix conflict
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go')
-rw-r--r--vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go
index 050bfe7e5..ccb332684 100644
--- a/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go
+++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go
@@ -814,7 +814,7 @@ func (con *Consensus) initialRound(
return
}
con.logger.Info("Selected as DKG set", "round", nextRound)
- con.cfgModule.registerDKG(nextRound, getDKGThreshold(config))
+ con.cfgModule.registerDKG(nextRound, utils.GetDKGThreshold(config))
con.event.RegisterHeight(startHeight+config.RoundLength*2/3,
func(uint64) {
func() {
@@ -1070,6 +1070,9 @@ func (con *Consensus) ProcessBlockRandomnessResult(
if rand.Position.Round == 0 {
return nil
}
+ if !con.bcModule.shouldAddRandomness(rand) {
+ return nil
+ }
if err := con.bcModule.addRandomness(rand); err != nil {
return err
}