aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/oracle_contracts_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/vm/oracle_contracts_test.go')
-rw-r--r--core/vm/oracle_contracts_test.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/core/vm/oracle_contracts_test.go b/core/vm/oracle_contracts_test.go
index f8f327a68..0b8b7b4f7 100644
--- a/core/vm/oracle_contracts_test.go
+++ b/core/vm/oracle_contracts_test.go
@@ -195,7 +195,11 @@ func (g *OracleContractsTestSuite) SetupTest() {
}
func (g *OracleContractsTestSuite) TearDownTest() {
- OracleContracts[GovernanceContractAddress].(*GovernanceContract).coreDKGUtils = &defaultCoreDKGUtils{}
+ OracleContracts[GovernanceContractAddress] = func() OracleContract {
+ return &GovernanceContract{
+ coreDKGUtils: &defaultCoreDKGUtils{},
+ }
+ }
}
func (g *OracleContractsTestSuite) newPrefundAccount() (*ecdsa.PrivateKey, common.Address) {
@@ -936,7 +940,11 @@ func (g *OracleContractsTestSuite) TestResetDKG() {
mock := &testCoreMock{
tsigReturn: true,
}
- OracleContracts[GovernanceContractAddress].(*GovernanceContract).coreDKGUtils = mock
+ OracleContracts[GovernanceContractAddress] = func() OracleContract {
+ return &GovernanceContract{
+ coreDKGUtils: mock,
+ }
+ }
// Fill data for previous rounds.
roundHeight := int64(g.config.RoundLength)