aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-10-25 11:17:52 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-12 12:19:09 +0800
commitb3ec3ce42ce5382fc16c532ad961b0ac2a3897dc (patch)
tree77c2ca24a653c38124ca43d5be0af785bea0a24f /core/vm
parente776662999ddf0ab195fb731975643708fa2e8c3 (diff)
downloaddexon-b3ec3ce42ce5382fc16c532ad961b0ac2a3897dc.tar.gz
dexon-b3ec3ce42ce5382fc16c532ad961b0ac2a3897dc.tar.zst
dexon-b3ec3ce42ce5382fc16c532ad961b0ac2a3897dc.zip
vendor: sync consensus core and fix conflict
Diffstat (limited to 'core/vm')
-rw-r--r--core/vm/governance.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/core/vm/governance.go b/core/vm/governance.go
index 5c5822261..3570482dc 100644
--- a/core/vm/governance.go
+++ b/core/vm/governance.go
@@ -33,6 +33,7 @@ import (
coreCrypto "github.com/dexon-foundation/dexon-consensus-core/core/crypto"
"github.com/dexon-foundation/dexon-consensus-core/core/crypto/ecdsa"
coreTypes "github.com/dexon-foundation/dexon-consensus-core/core/types"
+ dkgTypes "github.com/dexon-foundation/dexon-consensus-core/core/types/dkg"
)
var GovernanceContractAddress = common.HexToAddress("5765692d4e696e6720536f6e696320426f6a6965")
@@ -1394,7 +1395,7 @@ func (g *GovernanceContract) addDKGComplaint(round *big.Int, comp []byte) ([]byt
return nil, errExecutionReverted
}
- var dkgComplaint coreTypes.DKGComplaint
+ var dkgComplaint dkgTypes.Complaint
if err := rlp.DecodeBytes(comp, &dkgComplaint); err != nil {
g.penalize()
return nil, errExecutionReverted
@@ -1434,7 +1435,7 @@ func (g *GovernanceContract) addDKGMasterPublicKey(round *big.Int, mpk []byte) (
return nil, errExecutionReverted
}
- var dkgMasterPK coreTypes.DKGMasterPublicKey
+ var dkgMasterPK dkgTypes.MasterPublicKey
if err := rlp.DecodeBytes(mpk, &dkgMasterPK); err != nil {
g.penalize()
return nil, errExecutionReverted
@@ -1467,7 +1468,7 @@ func (g *GovernanceContract) addDKGFinalize(round *big.Int, finalize []byte) ([]
caller := g.contract.Caller()
- var dkgFinalize coreTypes.DKGFinalize
+ var dkgFinalize dkgTypes.Finalize
if err := rlp.DecodeBytes(finalize, &dkgFinalize); err != nil {
g.penalize()
return nil, errExecutionReverted
@@ -1566,9 +1567,9 @@ func (g *GovernanceContract) proposeCRS(nextRound *big.Int, signedCRS []byte) ([
// Prepare DKGMasterPublicKeys.
// TODO(w): make sure DKGMasterPKs are unique.
- var dkgMasterPKs []*coreTypes.DKGMasterPublicKey
+ var dkgMasterPKs []*dkgTypes.MasterPublicKey
for _, mpk := range g.state.DKGMasterPublicKeys(round) {
- x := new(coreTypes.DKGMasterPublicKey)
+ x := new(dkgTypes.MasterPublicKey)
if err := rlp.DecodeBytes(mpk, x); err != nil {
panic(err)
}
@@ -1576,9 +1577,9 @@ func (g *GovernanceContract) proposeCRS(nextRound *big.Int, signedCRS []byte) ([
}
// Prepare DKGComplaints.
- var dkgComplaints []*coreTypes.DKGComplaint
+ var dkgComplaints []*dkgTypes.Complaint
for _, comp := range g.state.DKGComplaints(round) {
- x := new(coreTypes.DKGComplaint)
+ x := new(dkgTypes.Complaint)
if err := rlp.DecodeBytes(comp, x); err != nil {
panic(err)
}