only init plugins if doing internal ipfs interface
This commit is contained in:
parent
c250235714
commit
1413533a04
@ -19,6 +19,7 @@ import (
|
|||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
"github.com/vulcanize/vulcanizedb/pkg/super_node/shared"
|
||||||
|
|
||||||
"github.com/vulcanize/vulcanizedb/pkg/ipfs"
|
"github.com/vulcanize/vulcanizedb/pkg/ipfs"
|
||||||
"github.com/vulcanize/vulcanizedb/pkg/super_node/resync"
|
"github.com/vulcanize/vulcanizedb/pkg/super_node/resync"
|
||||||
@ -45,8 +46,10 @@ func rsyncCmdCommand() {
|
|||||||
logWithCommand.Fatal(err)
|
logWithCommand.Fatal(err)
|
||||||
}
|
}
|
||||||
logWithCommand.Infof("resync config: %+v", rConfig)
|
logWithCommand.Infof("resync config: %+v", rConfig)
|
||||||
if err := ipfs.InitIPFSPlugins(); err != nil {
|
if rConfig.IPFSMode == shared.LocalInterface {
|
||||||
logWithCommand.Fatal(err)
|
if err := ipfs.InitIPFSPlugins(); err != nil {
|
||||||
|
logWithCommand.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
logWithCommand.Debug("initializing new resync service")
|
logWithCommand.Debug("initializing new resync service")
|
||||||
rService, err := resync.NewResyncService(rConfig)
|
rService, err := resync.NewResyncService(rConfig)
|
||||||
|
@ -59,8 +59,10 @@ func superNode() {
|
|||||||
logWithCommand.Fatal(err)
|
logWithCommand.Fatal(err)
|
||||||
}
|
}
|
||||||
logWithCommand.Infof("super node config: %+v", superNodeConfig)
|
logWithCommand.Infof("super node config: %+v", superNodeConfig)
|
||||||
if err := ipfs.InitIPFSPlugins(); err != nil {
|
if superNodeConfig.IPFSMode == shared.LocalInterface {
|
||||||
logWithCommand.Fatal(err)
|
if err := ipfs.InitIPFSPlugins(); err != nil {
|
||||||
|
logWithCommand.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
wg := &sync.WaitGroup{}
|
wg := &sync.WaitGroup{}
|
||||||
logWithCommand.Debug("initializing new super node service")
|
logWithCommand.Debug("initializing new super node service")
|
||||||
|
Loading…
Reference in New Issue
Block a user