Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
goshimmer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iota-imt
goshimmer
Commits
6798c3be
Commit
6798c3be
authored
5 years ago
by
capossele
Browse files
Options
Downloads
Patches
Plain Diff
WIP
parent
3797ffc8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
plugins/analysis/webinterface/recordedevents/recorded_events.go
+0
-7
0 additions, 7 deletions
...s/analysis/webinterface/recordedevents/recorded_events.go
plugins/autopeering/autopeering.go
+1
-4
1 addition, 4 deletions
plugins/autopeering/autopeering.go
runNetwork.sh
+1
-1
1 addition, 1 deletion
runNetwork.sh
with
2 additions
and
12 deletions
plugins/analysis/webinterface/recordedevents/recorded_events.go
+
0
−
7
View file @
6798c3be
package
recordedevents
package
recordedevents
import
(
import
(
"strconv"
"sync"
"sync"
"github.com/iotaledger/goshimmer/plugins/analysis/server"
"github.com/iotaledger/goshimmer/plugins/analysis/server"
...
@@ -17,7 +16,6 @@ var lock sync.Mutex
...
@@ -17,7 +16,6 @@ var lock sync.Mutex
func
Configure
(
plugin
*
node
.
Plugin
)
{
func
Configure
(
plugin
*
node
.
Plugin
)
{
server
.
Events
.
AddNode
.
Attach
(
events
.
NewClosure
(
func
(
nodeId
string
)
{
server
.
Events
.
AddNode
.
Attach
(
events
.
NewClosure
(
func
(
nodeId
string
)
{
plugin
.
LogInfo
(
"AddNode: "
+
nodeId
+
" sizeof "
+
strconv
.
Itoa
(
len
(
nodeId
)))
if
_
,
exists
:=
nodes
[
nodeId
];
!
exists
{
if
_
,
exists
:=
nodes
[
nodeId
];
!
exists
{
lock
.
Lock
()
lock
.
Lock
()
defer
lock
.
Unlock
()
defer
lock
.
Unlock
()
...
@@ -29,7 +27,6 @@ func Configure(plugin *node.Plugin) {
...
@@ -29,7 +27,6 @@ func Configure(plugin *node.Plugin) {
}))
}))
server
.
Events
.
RemoveNode
.
Attach
(
events
.
NewClosure
(
func
(
nodeId
string
)
{
server
.
Events
.
RemoveNode
.
Attach
(
events
.
NewClosure
(
func
(
nodeId
string
)
{
plugin
.
LogInfo
(
"RemoveNode: "
+
nodeId
)
lock
.
Lock
()
lock
.
Lock
()
defer
lock
.
Unlock
()
defer
lock
.
Unlock
()
...
@@ -37,7 +34,6 @@ func Configure(plugin *node.Plugin) {
...
@@ -37,7 +34,6 @@ func Configure(plugin *node.Plugin) {
}))
}))
server
.
Events
.
NodeOnline
.
Attach
(
events
.
NewClosure
(
func
(
nodeId
string
)
{
server
.
Events
.
NodeOnline
.
Attach
(
events
.
NewClosure
(
func
(
nodeId
string
)
{
plugin
.
LogInfo
(
"NodeOnline: "
+
nodeId
)
lock
.
Lock
()
lock
.
Lock
()
defer
lock
.
Unlock
()
defer
lock
.
Unlock
()
...
@@ -45,7 +41,6 @@ func Configure(plugin *node.Plugin) {
...
@@ -45,7 +41,6 @@ func Configure(plugin *node.Plugin) {
}))
}))
server
.
Events
.
NodeOffline
.
Attach
(
events
.
NewClosure
(
func
(
nodeId
string
)
{
server
.
Events
.
NodeOffline
.
Attach
(
events
.
NewClosure
(
func
(
nodeId
string
)
{
plugin
.
LogInfo
(
"NodeOffline: "
+
nodeId
)
lock
.
Lock
()
lock
.
Lock
()
defer
lock
.
Unlock
()
defer
lock
.
Unlock
()
...
@@ -53,7 +48,6 @@ func Configure(plugin *node.Plugin) {
...
@@ -53,7 +48,6 @@ func Configure(plugin *node.Plugin) {
}))
}))
server
.
Events
.
ConnectNodes
.
Attach
(
events
.
NewClosure
(
func
(
sourceId
string
,
targetId
string
)
{
server
.
Events
.
ConnectNodes
.
Attach
(
events
.
NewClosure
(
func
(
sourceId
string
,
targetId
string
)
{
plugin
.
LogInfo
(
"ConnectNodes: "
+
sourceId
+
" - "
+
targetId
)
lock
.
Lock
()
lock
.
Lock
()
defer
lock
.
Unlock
()
defer
lock
.
Unlock
()
...
@@ -67,7 +61,6 @@ func Configure(plugin *node.Plugin) {
...
@@ -67,7 +61,6 @@ func Configure(plugin *node.Plugin) {
}))
}))
server
.
Events
.
DisconnectNodes
.
Attach
(
events
.
NewClosure
(
func
(
sourceId
string
,
targetId
string
)
{
server
.
Events
.
DisconnectNodes
.
Attach
(
events
.
NewClosure
(
func
(
sourceId
string
,
targetId
string
)
{
plugin
.
LogInfo
(
"DisconnectNodes: "
+
sourceId
+
" - "
+
targetId
)
lock
.
Lock
()
lock
.
Lock
()
defer
lock
.
Unlock
()
defer
lock
.
Unlock
()
...
...
This diff is collapsed.
Click to expand it.
plugins/autopeering/autopeering.go
+
1
−
4
View file @
6798c3be
...
@@ -4,7 +4,6 @@ import (
...
@@ -4,7 +4,6 @@ import (
"encoding/base64"
"encoding/base64"
"fmt"
"fmt"
"io/ioutil"
"io/ioutil"
"log"
"net"
"net"
"net/http"
"net/http"
"strconv"
"strconv"
...
@@ -16,7 +15,6 @@ import (
...
@@ -16,7 +15,6 @@ import (
"github.com/iotaledger/autopeering-sim/selection"
"github.com/iotaledger/autopeering-sim/selection"
"github.com/iotaledger/autopeering-sim/server"
"github.com/iotaledger/autopeering-sim/server"
"github.com/iotaledger/autopeering-sim/transport"
"github.com/iotaledger/autopeering-sim/transport"
"github.com/iotaledger/goshimmer/packages/node"
"github.com/iotaledger/goshimmer/plugins/autopeering/local"
"github.com/iotaledger/goshimmer/plugins/autopeering/local"
"github.com/iotaledger/goshimmer/plugins/gossip"
"github.com/iotaledger/goshimmer/plugins/gossip"
"github.com/iotaledger/hive.go/parameter"
"github.com/iotaledger/hive.go/parameter"
...
@@ -24,7 +22,6 @@ import (
...
@@ -24,7 +22,6 @@ import (
)
)
var
(
var
(
PLUGIN
=
node
.
NewPlugin
(
"Auto Peering"
,
node
.
Enabled
,
configure
,
run
)
debugLevel
=
"info"
debugLevel
=
"info"
close
=
make
(
chan
struct
{},
1
)
close
=
make
(
chan
struct
{},
1
)
srv
*
server
.
Server
srv
*
server
.
Server
...
@@ -85,7 +82,7 @@ func start() {
...
@@ -85,7 +82,7 @@ func start() {
masterPeers
:=
[]
*
peer
.
Peer
{}
masterPeers
:=
[]
*
peer
.
Peer
{}
master
,
err
:=
parseEntryNodes
()
master
,
err
:=
parseEntryNodes
()
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Print
f
(
"Ignoring entry nodes: %v
\n
"
,
err
)
log
.
Fatal
f
(
"Ignoring entry nodes: %v
\n
"
,
err
)
}
else
if
master
!=
nil
{
}
else
if
master
!=
nil
{
masterPeers
=
master
masterPeers
=
master
}
}
...
...
This diff is collapsed.
Click to expand it.
runNetwork.sh
+
1
−
1
View file @
6798c3be
...
@@ -27,6 +27,6 @@ for i in `seq 1 $1`; do
...
@@ -27,6 +27,6 @@ for i in `seq 1 $1`; do
mkdir
node_
$i
/logs
mkdir
node_
$i
/logs
cp
../shimmer node_
$i
/
cp
../shimmer node_
$i
/
cd
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
.
l
ogLevel 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
.
L
ogLevel 4
--node
.disablePlugins statusscreen
--analysis
.serverAddress 127.0.0.1:188 &
cd
..
cd
..
done
done
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment