From 9ad792c6eec97a05c5f801b41d28541e58237038 Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 21 Dec 2021 20:03:46 +0100 Subject: [PATCH] node: move oasis to testnet mode We're not ready to release this yet. commit-id:c2d6531f --- node/cmd/guardiand/adminnodes.go | 2 +- node/cmd/guardiand/node.go | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/node/cmd/guardiand/adminnodes.go b/node/cmd/guardiand/adminnodes.go index 5cdff0c0e..4fbd0e299 100644 --- a/node/cmd/guardiand/adminnodes.go +++ b/node/cmd/guardiand/adminnodes.go @@ -101,10 +101,10 @@ func runListNodes(cmd *cobra.Command, args []string) { {"BSC", vaa.ChainIDBSC}, {"Polygon", vaa.ChainIDPolygon}, {"Avalanche", vaa.ChainIDAvalanche}, - {"Oasis", vaa.ChainIDOasis}, } if isTestnet { + networks = append(networks, network{"Oasis", vaa.ChainIDOasis}) networks = append(networks, network{"Ropsten", vaa.ChainIDEthereumRopsten}) } diff --git a/node/cmd/guardiand/node.go b/node/cmd/guardiand/node.go index 735217886..5c926306f 100644 --- a/node/cmd/guardiand/node.go +++ b/node/cmd/guardiand/node.go @@ -251,8 +251,8 @@ func runNode(cmd *cobra.Command, args []string) { readiness.RegisterComponent(common.ReadinessBSCSyncing) readiness.RegisterComponent(common.ReadinessPolygonSyncing) readiness.RegisterComponent(common.ReadinessAvalancheSyncing) - readiness.RegisterComponent(common.ReadinessOasisSyncing) if *testnetMode { + readiness.RegisterComponent(common.ReadinessOasisSyncing) readiness.RegisterComponent(common.ReadinessEthRopstenSyncing) } @@ -342,10 +342,13 @@ func runNode(cmd *cobra.Command, args []string) { if *avalancheRPC == "" { logger.Fatal("Please specify --avalancheRPC") } - if *oasisRPC == "" { - logger.Fatal("Please specify --oasisRPC") - } if *testnetMode { + if *oasisRPC == "" { + logger.Fatal("Please specify --oasisRPC") + } + if *oasisContract == "" { + logger.Fatal("Please specify --oasisContract") + } if *ethRopstenRPC == "" { logger.Fatal("Please specify --ethRopstenRPC") } @@ -566,12 +569,12 @@ func runNode(cmd *cobra.Command, args []string) { ethereum.NewEthWatcher(*avalancheRPC, avalancheContractAddr, "avalanche", common.ReadinessAvalancheSyncing, vaa.ChainIDAvalanche, lockC, nil).Run); err != nil { return err } - if err := supervisor.Run(ctx, "oasiswatch", - ethereum.NewEthWatcher(*oasisRPC, oasisContractAddr, "oasis", common.ReadinessOasisSyncing, vaa.ChainIDOasis, lockC, nil).Run); err != nil { - return err - } if *testnetMode { + if err := supervisor.Run(ctx, "oasiswatch", + ethereum.NewEthWatcher(*oasisRPC, oasisContractAddr, "oasis", common.ReadinessOasisSyncing, vaa.ChainIDOasis, lockC, nil).Run); err != nil { + return err + } if err := supervisor.Run(ctx, "ethropstenwatch", ethereum.NewEthWatcher(*ethRopstenRPC, ethRopstenContractAddr, "ethropsten", common.ReadinessEthRopstenSyncing, vaa.ChainIDEthereumRopsten, lockC, setC).Run); err != nil { return err