diff --git a/cmd/resync.go b/cmd/resync.go index af16a58e..a2f6cf65 100644 --- a/cmd/resync.go +++ b/cmd/resync.go @@ -19,6 +19,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/viper" + "github.com/vulcanize/vulcanizedb/pkg/super_node/shared" "github.com/vulcanize/vulcanizedb/pkg/ipfs" "github.com/vulcanize/vulcanizedb/pkg/super_node/resync" @@ -45,8 +46,10 @@ func rsyncCmdCommand() { logWithCommand.Fatal(err) } logWithCommand.Infof("resync config: %+v", rConfig) - if err := ipfs.InitIPFSPlugins(); err != nil { - logWithCommand.Fatal(err) + if rConfig.IPFSMode == shared.LocalInterface { + if err := ipfs.InitIPFSPlugins(); err != nil { + logWithCommand.Fatal(err) + } } logWithCommand.Debug("initializing new resync service") rService, err := resync.NewResyncService(rConfig) diff --git a/cmd/superNode.go b/cmd/superNode.go index 43f31473..02f35420 100644 --- a/cmd/superNode.go +++ b/cmd/superNode.go @@ -59,8 +59,10 @@ func superNode() { logWithCommand.Fatal(err) } logWithCommand.Infof("super node config: %+v", superNodeConfig) - if err := ipfs.InitIPFSPlugins(); err != nil { - logWithCommand.Fatal(err) + if superNodeConfig.IPFSMode == shared.LocalInterface { + if err := ipfs.InitIPFSPlugins(); err != nil { + logWithCommand.Fatal(err) + } } wg := &sync.WaitGroup{} logWithCommand.Debug("initializing new super node service")