Skip to content
Snippets Groups Projects
Unverified Commit ef5ab377 authored by Wolfgang Welz's avatar Wolfgang Welz Committed by GitHub
Browse files

Fix: Allow starting a node with gossip disabled (#97)

* fix: remove selection flag and use gossip plugin

* Upgrade hive.go
parent e7e4f19e
No related branches found
No related tags found
No related merge requests found
......@@ -8,8 +8,7 @@
"entrynodes":[
"V8LYtWWcPYYDTTXLeIEFjJEuWlsjDiI0+Pq/Cx9ai6g=@116.202.49.178:14626"
],
"port":14626,
"selection":true
"port":14626
},
"database":{
"directory":"mainnetdb"
......
......@@ -11,7 +11,7 @@ require (
github.com/go-zeromq/zmq4 v0.7.0
github.com/golang/protobuf v1.3.2
github.com/gorilla/websocket v1.4.1
github.com/iotaledger/hive.go v0.0.0-20200109143501-f876e7457f15
github.com/iotaledger/hive.go v0.0.0-20200110132858-ea86cdb9d91e
github.com/iotaledger/iota.go v1.0.0-beta.13
github.com/labstack/echo v3.3.10+incompatible
github.com/labstack/gommon v0.3.0 // indirect
......
......@@ -14,7 +14,9 @@ import (
"github.com/iotaledger/goshimmer/packages/autopeering/transport"
"github.com/iotaledger/goshimmer/packages/parameter"
"github.com/iotaledger/goshimmer/plugins/autopeering/local"
"github.com/iotaledger/goshimmer/plugins/gossip"
"github.com/iotaledger/hive.go/logger"
"github.com/iotaledger/hive.go/node"
"github.com/pkg/errors"
)
......@@ -39,7 +41,8 @@ func configureAP() {
MasterPeers: masterPeers,
})
if parameter.NodeConfig.GetBool(CFG_SELECTION) {
// enable peer selection only when gossip is enabled
if !node.IsSkipped(gossip.PLUGIN) {
Selection = selection.New(local.GetInstance(), Discovery, selection.Config{
Log: log.Named("sel"),
Param: &selection.Parameters{
......
......@@ -6,10 +6,8 @@ import (
const (
CFG_ENTRY_NODES = "autopeering.entryNodes"
CFG_SELECTION = "autopeering.selection"
)
func init() {
flag.StringSlice(CFG_ENTRY_NODES, []string{"V8LYtWWcPYYDTTXLeIEFjJEuWlsjDiI0+Pq/Cx9ai6g=@116.202.49.178:14626"}, "list of trusted entry nodes for auto peering")
flag.Bool(CFG_SELECTION, true, "enable peer selection")
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment