diff --git a/plugins/autopeering/autopeering.go b/plugins/autopeering/autopeering.go index 7b33f4224e548f77467be7a277e2f854f05ec16c..4b3707cc7acb3e7034f17e1c103256ffcc8ce7f0 100644 --- a/plugins/autopeering/autopeering.go +++ b/plugins/autopeering/autopeering.go @@ -10,7 +10,6 @@ import ( "sync" "github.com/iotaledger/goshimmer/plugins/autopeering/local" - "github.com/iotaledger/goshimmer/plugins/banner" "github.com/iotaledger/goshimmer/plugins/config" "github.com/iotaledger/hive.go/autopeering/discover" "github.com/iotaledger/hive.go/autopeering/peer" @@ -25,17 +24,14 @@ import ( // autopeering constants const ( - ProtocolVersion = 0 // update on protocol changes - NetworkVersion = "v0.2" // update on network changes + ProtocolVersion = 0 // update on protocol changes + NetworkVersion = 2 // update on network changes ) var ( // ErrParsingMasterNode is returned for an invalid master node. ErrParsingMasterNode = errors.New("cannot parse master node") - // networkID specifies the autopeering network identifier. - networkID = hash32([]byte(banner.AppVersion + NetworkVersion)) - // Conn contains the network connection. Conn *NetConnMetric ) @@ -56,11 +52,6 @@ var ( }{c: make(chan *server.Server, 1)} ) -// NetworkID gets the networkID. -func NetworkID() uint32 { - return networkID -} - // Discovery returns the peer discovery instance. func Discovery() *discover.Protocol { peerDiscOnce.Do(createPeerDisc) @@ -102,7 +93,7 @@ func createPeerDisc() { } log.Debugf("Master peers: %v", masterPeers) - peerDisc = discover.New(local.GetInstance(), ProtocolVersion, networkID, + peerDisc = discover.New(local.GetInstance(), ProtocolVersion, NetworkVersion, discover.Logger(log), discover.MasterPeers(masterPeers), ) diff --git a/plugins/database/versioning.go b/plugins/database/versioning.go index 0ee20f7b3a8f1de65889fe8c6353687606d98dbc..0b62a5bf481e5f8de14b2b54b6209a63f9e896ae 100644 --- a/plugins/database/versioning.go +++ b/plugins/database/versioning.go @@ -10,7 +10,7 @@ import ( const ( // DBVersion defines the version of the database schema this version of GoShimmer supports. // Every time there's a breaking change regarding the stored data, this version flag should be adjusted. - DBVersion = 2 + DBVersion = 3 ) var ( diff --git a/plugins/portcheck/plugin.go b/plugins/portcheck/plugin.go index ebfe045bf954be4f4175f6824c9c0991516128a1..e1c7530629a779c4e8caf283160b6ad0987ef2d3 100644 --- a/plugins/portcheck/plugin.go +++ b/plugins/portcheck/plugin.go @@ -59,7 +59,7 @@ func checkAutopeeringConnection() { defer conn.Close() // create a new discovery server for the port check - disc := discover.New(local.GetInstance(), autopeering.ProtocolVersion, autopeering.NetworkID(), discover.Logger(log)) + disc := discover.New(local.GetInstance(), autopeering.ProtocolVersion, autopeering.NetworkVersion, discover.Logger(log)) srv := server.Serve(local.GetInstance(), conn, log, disc) defer srv.Close()