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,9 +46,11 @@ func rsyncCmdCommand() {
|
|||||||
logWithCommand.Fatal(err)
|
logWithCommand.Fatal(err)
|
||||||
}
|
}
|
||||||
logWithCommand.Infof("resync config: %+v", rConfig)
|
logWithCommand.Infof("resync config: %+v", rConfig)
|
||||||
|
if rConfig.IPFSMode == shared.LocalInterface {
|
||||||
if err := ipfs.InitIPFSPlugins(); err != nil {
|
if err := ipfs.InitIPFSPlugins(); err != nil {
|
||||||
logWithCommand.Fatal(err)
|
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)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -59,9 +59,11 @@ func superNode() {
|
|||||||
logWithCommand.Fatal(err)
|
logWithCommand.Fatal(err)
|
||||||
}
|
}
|
||||||
logWithCommand.Infof("super node config: %+v", superNodeConfig)
|
logWithCommand.Infof("super node config: %+v", superNodeConfig)
|
||||||
|
if superNodeConfig.IPFSMode == shared.LocalInterface {
|
||||||
if err := ipfs.InitIPFSPlugins(); err != nil {
|
if err := ipfs.InitIPFSPlugins(); err != nil {
|
||||||
logWithCommand.Fatal(err)
|
logWithCommand.Fatal(err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
wg := &sync.WaitGroup{}
|
wg := &sync.WaitGroup{}
|
||||||
logWithCommand.Debug("initializing new super node service")
|
logWithCommand.Debug("initializing new super node service")
|
||||||
superNode, err := super_node.NewSuperNode(superNodeConfig)
|
superNode, err := super_node.NewSuperNode(superNodeConfig)
|
||||||
|
Loading…
Reference in New Issue
Block a user