aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/oracle_contracts.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/vm/oracle_contracts.go')
-rw-r--r--core/vm/oracle_contracts.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/vm/oracle_contracts.go b/core/vm/oracle_contracts.go
index 56e82f7df..e58133990 100644
--- a/core/vm/oracle_contracts.go
+++ b/core/vm/oracle_contracts.go
@@ -1242,6 +1242,10 @@ func (g *GovernanceContract) addDKGComplaint(round *big.Int, comp []byte) ([]byt
return g.penalize()
}
+ if dkgComplaint.Reset != g.state.DKGResetCount(round).Uint64() {
+ return g.penalize()
+ }
+
// DKGComplaint must belongs to someone in DKG set.
if !g.inDKGSet(round, dkgComplaint.ProposerID) {
return g.penalize()
@@ -1324,6 +1328,10 @@ func (g *GovernanceContract) addDKGMasterPublicKey(round *big.Int, mpk []byte) (
return g.penalize()
}
+ if dkgMasterPK.Reset != g.state.DKGResetCount(round).Uint64() {
+ return g.penalize()
+ }
+
// DKGMasterPublicKey must belongs to someone in DKG set.
if !g.inDKGSet(round, dkgMasterPK.ProposerID) {
return g.penalize()
@@ -1350,6 +1358,10 @@ func (g *GovernanceContract) addDKGMPKReady(round *big.Int, ready []byte) ([]byt
return g.penalize()
}
+ if dkgReady.Reset != g.state.DKGResetCount(round).Uint64() {
+ return g.penalize()
+ }
+
// DKGFInalize must belongs to someone in DKG set.
if !g.inDKGSet(round, dkgReady.ProposerID) {
return g.penalize()
@@ -1380,6 +1392,10 @@ func (g *GovernanceContract) addDKGFinalize(round *big.Int, finalize []byte) ([]
return g.penalize()
}
+ if dkgFinalize.Reset != g.state.DKGResetCount(round).Uint64() {
+ return g.penalize()
+ }
+
// DKGFInalize must belongs to someone in DKG set.
if !g.inDKGSet(round, dkgFinalize.ProposerID) {
return g.penalize()