Skip to content
Snippets Groups Projects
Commit 6798c3be authored by capossele's avatar capossele
Browse files

:construction: WIP

parent 3797ffc8
No related branches found
No related tags found
No related merge requests found
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()
......
......@@ -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
}
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment