From 6798c3be178850c2dcb68e811ded24af18b997cf Mon Sep 17 00:00:00 2001
From: capossele <angelocapossele@gmail.com>
Date: Mon, 25 Nov 2019 15:20:05 +0000
Subject: [PATCH] :construction: WIP

---
 .../webinterface/recordedevents/recorded_events.go         | 7 -------
 plugins/autopeering/autopeering.go                         | 5 +----
 runNetwork.sh                                              | 2 +-
 3 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/plugins/analysis/webinterface/recordedevents/recorded_events.go b/plugins/analysis/webinterface/recordedevents/recorded_events.go
index 4496ecac..c31574b8 100644
--- a/plugins/analysis/webinterface/recordedevents/recorded_events.go
+++ b/plugins/analysis/webinterface/recordedevents/recorded_events.go
@@ -1,7 +1,6 @@
 package recordedevents
 
 import (
-	"strconv"
 	"sync"
 
 	"github.com/iotaledger/goshimmer/plugins/analysis/server"
@@ -17,7 +16,6 @@ var lock sync.Mutex
 
 func Configure(plugin *node.Plugin) {
 	server.Events.AddNode.Attach(events.NewClosure(func(nodeId string) {
-		plugin.LogInfo("AddNode: " + nodeId + " sizeof " + strconv.Itoa(len(nodeId)))
 		if _, exists := nodes[nodeId]; !exists {
 			lock.Lock()
 			defer lock.Unlock()
@@ -29,7 +27,6 @@ func Configure(plugin *node.Plugin) {
 	}))
 
 	server.Events.RemoveNode.Attach(events.NewClosure(func(nodeId string) {
-		plugin.LogInfo("RemoveNode: " + nodeId)
 		lock.Lock()
 		defer lock.Unlock()
 
@@ -37,7 +34,6 @@ func Configure(plugin *node.Plugin) {
 	}))
 
 	server.Events.NodeOnline.Attach(events.NewClosure(func(nodeId string) {
-		plugin.LogInfo("NodeOnline: " + nodeId)
 		lock.Lock()
 		defer lock.Unlock()
 
@@ -45,7 +41,6 @@ func Configure(plugin *node.Plugin) {
 	}))
 
 	server.Events.NodeOffline.Attach(events.NewClosure(func(nodeId string) {
-		plugin.LogInfo("NodeOffline: " + nodeId)
 		lock.Lock()
 		defer lock.Unlock()
 
@@ -53,7 +48,6 @@ func Configure(plugin *node.Plugin) {
 	}))
 
 	server.Events.ConnectNodes.Attach(events.NewClosure(func(sourceId string, targetId string) {
-		plugin.LogInfo("ConnectNodes: " + sourceId + " - " + targetId)
 		lock.Lock()
 		defer lock.Unlock()
 
@@ -67,7 +61,6 @@ func Configure(plugin *node.Plugin) {
 	}))
 
 	server.Events.DisconnectNodes.Attach(events.NewClosure(func(sourceId string, targetId string) {
-		plugin.LogInfo("DisconnectNodes: " + sourceId + " - " + targetId)
 		lock.Lock()
 		defer lock.Unlock()
 
diff --git a/plugins/autopeering/autopeering.go b/plugins/autopeering/autopeering.go
index aacc842e..e24d67de 100644
--- a/plugins/autopeering/autopeering.go
+++ b/plugins/autopeering/autopeering.go
@@ -4,7 +4,6 @@ import (
 	"encoding/base64"
 	"fmt"
 	"io/ioutil"
-	"log"
 	"net"
 	"net/http"
 	"strconv"
@@ -16,7 +15,6 @@ import (
 	"github.com/iotaledger/autopeering-sim/selection"
 	"github.com/iotaledger/autopeering-sim/server"
 	"github.com/iotaledger/autopeering-sim/transport"
-	"github.com/iotaledger/goshimmer/packages/node"
 	"github.com/iotaledger/goshimmer/plugins/autopeering/local"
 	"github.com/iotaledger/goshimmer/plugins/gossip"
 	"github.com/iotaledger/hive.go/parameter"
@@ -24,7 +22,6 @@ import (
 )
 
 var (
-	PLUGIN     = node.NewPlugin("Auto Peering", node.Enabled, configure, run)
 	debugLevel = "info"
 	close      = make(chan struct{}, 1)
 	srv        *server.Server
@@ -85,7 +82,7 @@ func start() {
 	masterPeers := []*peer.Peer{}
 	master, err := parseEntryNodes()
 	if err != nil {
-		log.Printf("Ignoring entry nodes: %v\n", err)
+		log.Fatalf("Ignoring entry nodes: %v\n", err)
 	} else if master != nil {
 		masterPeers = master
 	}
diff --git a/runNetwork.sh b/runNetwork.sh
index 0e2b315f..a9e84ee5 100755
--- a/runNetwork.sh
+++ b/runNetwork.sh
@@ -27,6 +27,6 @@ for i in `seq 1 $1`; do
     mkdir node_$i/logs
     cp ../shimmer node_$i/
     cd node_$i
-    ./shimmer --autopeering.port $PEERING_PORT --gossip.port $GOSSIP_PORT --autopeering.address 127.0.0.1 --autopeering.entryNodes 6rtO4nW2nzbSqZ8nrf0VFOn+fuyluf6ltJTkKpUc3LM=@127.0.0.1:14626 --node.logLevel 4 --node.disablePlugins statusscreen --analysis.serverAddress 127.0.0.1:188 &
+    ./shimmer --autopeering.port $PEERING_PORT --gossip.port $GOSSIP_PORT --autopeering.address 127.0.0.1 --autopeering.entryNodes 6rtO4nW2nzbSqZ8nrf0VFOn+fuyluf6ltJTkKpUc3LM=@127.0.0.1:14626 --node.LogLevel 4 --node.disablePlugins statusscreen --analysis.serverAddress 127.0.0.1:188 &
     cd ..
 done
\ No newline at end of file
-- 
GitLab