From 5e9c3c1d44c153c8db66233a278031081c5b26fc Mon Sep 17 00:00:00 2001 From: Xinan Xu <39632914+xinaxu@users.noreply.github.com> Date: Wed, 18 Oct 2023 14:52:49 -0700 Subject: [PATCH] Correct when the the current network global var is set --- .dockerignore | 3 ++- cmd/motion/main.go | 13 ++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.dockerignore b/.dockerignore index cc5fd59..7280e5b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ .github *.md -integration/test \ No newline at end of file +integration/test +docker-compose*.yml diff --git a/cmd/motion/main.go b/cmd/motion/main.go index 14a3f4d..2d751a3 100644 --- a/cmd/motion/main.go +++ b/cmd/motion/main.go @@ -76,13 +76,6 @@ func main() { Name: "lotus-test", Category: "Lotus", EnvVars: []string{"LOTUS_TEST"}, - Action: func(context *cli.Context, lotusTest bool) error { - if lotusTest { - logger.Info("Current network is set to Testnet") - address.CurrentNetwork = address.Testnet - } - return nil - }, }, &cli.UintFlag{ Name: "replicationFactor", @@ -165,6 +158,12 @@ func main() { }, }, Action: func(cctx *cli.Context) error { + if cctx.Bool("lotus-test") { + logger.Info("Current network is set to Testnet") + address.CurrentNetwork = address.Testnet + } else { + address.CurrentNetwork = address.Mainnet + } storeDir := cctx.String("storeDir") var store blob.Store if cctx.Bool("experimentalSingularityStore") {