aboutsummaryrefslogtreecommitdiffstats
path: root/dex
diff options
context:
space:
mode:
authorWei-Ning Huang <aitjcize@gmail.com>2018-11-14 10:57:53 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:18 +0800
commit070647ec674c96582ebe93dadeefe017964c0488 (patch)
treecf14e337a1f306adc15ccafa4086f2745f8a4093 /dex
parentcbb7cc20f824fd96279a0c14eb5d0a2187347955 (diff)
downloadgo-tangerine-070647ec674c96582ebe93dadeefe017964c0488.tar
go-tangerine-070647ec674c96582ebe93dadeefe017964c0488.tar.gz
go-tangerine-070647ec674c96582ebe93dadeefe017964c0488.tar.bz2
go-tangerine-070647ec674c96582ebe93dadeefe017964c0488.tar.lz
go-tangerine-070647ec674c96582ebe93dadeefe017964c0488.tar.xz
go-tangerine-070647ec674c96582ebe93dadeefe017964c0488.tar.zst
go-tangerine-070647ec674c96582ebe93dadeefe017964c0488.zip
core: validate DKG set with correct nodeset in round-2 (#19)
* vendor: sync consensus core * core: validate DKG set with correct nodeset in round-2
Diffstat (limited to 'dex')
-rw-r--r--dex/governance.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/dex/governance.go b/dex/governance.go
index 92a8789b3..0251d2afd 100644
--- a/dex/governance.go
+++ b/dex/governance.go
@@ -24,8 +24,6 @@ import (
"github.com/dexon-foundation/dexon/rpc"
)
-const configActivationOffset = 2
-
type DexconGovernance struct {
b *DexAPIBackend
chainConfig *params.ChainConfig
@@ -68,10 +66,10 @@ func (d *DexconGovernance) getGovState() *vm.GovernanceStateHelper {
}
func (d *DexconGovernance) getGovStateAtRound(round uint64) *vm.GovernanceStateHelper {
- if round < configActivationOffset {
+ if round < dexCore.ConfigRoundShift {
round = 0
} else {
- round -= configActivationOffset
+ round -= dexCore.ConfigRoundShift
}
ctx := context.Background()
blockHeight, err := d.getRoundHeight(ctx, round)