diff --git a/integration/networktest/actions/l1/important_contracts.go b/integration/networktest/actions/l1/important_contracts.go index 05cc2261f6..34d4bc4636 100644 --- a/integration/networktest/actions/l1/important_contracts.go +++ b/integration/networktest/actions/l1/important_contracts.go @@ -2,7 +2,8 @@ package l1 import ( "context" - "fmt" + "time" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/obscuronet/go-obscuro/go/common/retry" @@ -11,7 +12,6 @@ import ( "github.com/obscuronet/go-obscuro/integration/common/testlog" "github.com/obscuronet/go-obscuro/integration/networktest" "github.com/pkg/errors" - "time" ) type setImportantContract struct { @@ -86,13 +86,12 @@ func (s *setImportantContract) Run(ctx context.Context, network networktest.Netw }, retry.NewTimeoutStrategy(15*time.Second, 1*time.Second)) } -func (s *setImportantContract) Verify(ctx context.Context, network networktest.NetworkConnector) error { +func (s *setImportantContract) Verify(_ context.Context, network networktest.NetworkConnector) error { cli, err := obsclient.Dial(network.ValidatorRPCAddress(0)) if err != nil { return errors.Wrap(err, "failed to dial obsClient") } networkCfg, err := cli.GetConfig() - fmt.Println("networkCfg: ", networkCfg) if err != nil { return errors.Wrap(err, "failed to get network config") } @@ -100,9 +99,6 @@ func (s *setImportantContract) Verify(ctx context.Context, network networktest.N if networkCfg.ImportantContracts == nil || len(networkCfg.ImportantContracts) == 0 { return errors.New("no important contracts set") } - if len(networkCfg.ImportantContracts) > 1 { - return errors.New("more than one important contract set") - } if addr, ok := networkCfg.ImportantContracts[s.contractKey]; !ok || addr != s.contractAddress { return errors.New("important contract not set") } diff --git a/integration/networktest/env/testnet.go b/integration/networktest/env/testnet.go index 4b703690f5..430fba7732 100644 --- a/integration/networktest/env/testnet.go +++ b/integration/networktest/env/testnet.go @@ -6,11 +6,12 @@ import ( "encoding/json" "errors" "fmt" - "github.com/obscuronet/go-obscuro/go/wallet" "math/big" "net/http" "time" + "github.com/obscuronet/go-obscuro/go/wallet" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/obscuronet/go-obscuro/integration/networktest/userwallet" diff --git a/integration/networktest/interfaces.go b/integration/networktest/interfaces.go index 4019eb686d..8809c66200 100644 --- a/integration/networktest/interfaces.go +++ b/integration/networktest/interfaces.go @@ -2,6 +2,7 @@ package networktest import ( "context" + "github.com/obscuronet/go-obscuro/go/wallet" "github.com/obscuronet/go-obscuro/go/ethadapter" diff --git a/integration/networktest/tests/bridge/important_contracts_test.go b/integration/networktest/tests/bridge/important_contracts_test.go index 1ddd7aaa2f..359a797171 100644 --- a/integration/networktest/tests/bridge/important_contracts_test.go +++ b/integration/networktest/tests/bridge/important_contracts_test.go @@ -1,12 +1,13 @@ package bridge import ( + "testing" + gethcommon "github.com/ethereum/go-ethereum/common" "github.com/obscuronet/go-obscuro/integration/networktest" "github.com/obscuronet/go-obscuro/integration/networktest/actions" "github.com/obscuronet/go-obscuro/integration/networktest/actions/l1" "github.com/obscuronet/go-obscuro/integration/networktest/env" - "testing" ) func TestImportantContractsLookup(t *testing.T) {