aboutsummaryrefslogtreecommitdiffstats
path: root/dex/governance.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-10-23 14:12:10 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:16 +0800
commit18b940c6840e1030be76945207fb5bdf6323d696 (patch)
tree1c006cd2f436fabbcbf0ec173acd86eead8510f3 /dex/governance.go
parent4038a460b537083b2395fc1d443ebffe6a739d23 (diff)
downloadgo-tangerine-18b940c6840e1030be76945207fb5bdf6323d696.tar
go-tangerine-18b940c6840e1030be76945207fb5bdf6323d696.tar.gz
go-tangerine-18b940c6840e1030be76945207fb5bdf6323d696.tar.bz2
go-tangerine-18b940c6840e1030be76945207fb5bdf6323d696.tar.lz
go-tangerine-18b940c6840e1030be76945207fb5bdf6323d696.tar.xz
go-tangerine-18b940c6840e1030be76945207fb5bdf6323d696.tar.zst
go-tangerine-18b940c6840e1030be76945207fb5bdf6323d696.zip
dex: fix DKG round switching
Diffstat (limited to 'dex/governance.go')
-rw-r--r--dex/governance.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/dex/governance.go b/dex/governance.go
index 11b97080d..c7ea440dd 100644
--- a/dex/governance.go
+++ b/dex/governance.go
@@ -144,7 +144,7 @@ func (d *DexconGovernance) sendGovTx(ctx context.Context, data []byte) error {
// CRS returns the CRS for a given round.
func (d *DexconGovernance) CRS(round uint64) coreCommon.Hash {
- s := d.getGovStateAtRound(round)
+ s := d.getGovState()
return coreCommon.Hash(s.CRS(big.NewInt(int64(round))))
}
@@ -154,10 +154,10 @@ func (d *DexconGovernance) LenCRS() uint64 {
}
// ProposeCRS send proposals of a new CRS
-func (d *DexconGovernance) ProposeCRS(signedCRS []byte) {
+func (d *DexconGovernance) ProposeCRS(round uint64, signedCRS []byte) {
method := vm.GovernanceContractName2Method["proposeCRS"]
- res, err := method.Inputs.Pack(signedCRS)
+ res, err := method.Inputs.Pack(big.NewInt(int64(round)), signedCRS)
if err != nil {
log.Error("failed to pack proposeCRS input", "err", err)
return