diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-10-23 14:12:10 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | ed9544ce6c9c9525f9fcf9c10d11010734c9da13 (patch) | |
tree | e8fc1353051980b57d45586fd034040b90da529f /dex | |
parent | 72d59f7d765607bd6aafeb836e6034c22a5eb877 (diff) | |
download | dexon-ed9544ce6c9c9525f9fcf9c10d11010734c9da13.tar.gz dexon-ed9544ce6c9c9525f9fcf9c10d11010734c9da13.tar.zst dexon-ed9544ce6c9c9525f9fcf9c10d11010734c9da13.zip |
dex: fix DKG round switching
Diffstat (limited to 'dex')
-rw-r--r-- | dex/governance.go | 6 |
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 |