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
97172be5
Commit
97172be5
authored
5 years ago
by
capossele
Browse files
Options
Downloads
Patches
Plain Diff
changes debug level
parent
6faf3d7e
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
plugins/autopeering/autopeering.go
+23
-24
23 additions, 24 deletions
plugins/autopeering/autopeering.go
plugins/gossip/gossip.go
+2
-2
2 additions, 2 deletions
plugins/gossip/gossip.go
runNetwork.sh
+1
-1
1 addition, 1 deletion
runNetwork.sh
with
27 additions
and
27 deletions
.gitignore
+
1
−
0
View file @
97172be5
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
# Logs
# Logs
logs/*
logs/*
testNodes/*
testNodes/*
*.log
# Project files
# Project files
.idea
.idea
...
...
This diff is collapsed.
Click to expand it.
plugins/autopeering/autopeering.go
+
23
−
24
View file @
97172be5
...
@@ -7,7 +7,6 @@ import (
...
@@ -7,7 +7,6 @@ import (
"net"
"net"
"net/http"
"net/http"
"strconv"
"strconv"
"time"
"github.com/iotaledger/autopeering-sim/discover"
"github.com/iotaledger/autopeering-sim/discover"
"github.com/iotaledger/autopeering-sim/logger"
"github.com/iotaledger/autopeering-sim/logger"
...
@@ -23,7 +22,7 @@ import (
...
@@ -23,7 +22,7 @@ import (
)
)
var
(
var
(
debugLevel
=
"
debug
"
debugLevel
=
"
info
"
close
=
make
(
chan
struct
{},
1
)
close
=
make
(
chan
struct
{},
1
)
srv
*
server
.
Server
srv
*
server
.
Server
Discovery
*
discover
.
Protocol
Discovery
*
discover
.
Protocol
...
@@ -33,7 +32,7 @@ var (
...
@@ -33,7 +32,7 @@ var (
const
defaultZLC
=
`{
const
defaultZLC
=
`{
"level": "info",
"level": "info",
"development": false,
"development": false,
"outputPaths": ["
stdout
"],
"outputPaths": ["
./autopeering.log
"],
"errorOutputPaths": ["stderr"],
"errorOutputPaths": ["stderr"],
"encoding": "console",
"encoding": "console",
"encoderConfig": {
"encoderConfig": {
...
@@ -151,12 +150,12 @@ func start() {
...
@@ -151,12 +150,12 @@ func start() {
}()
}()
// Only for debug
// Only for debug
go
func
()
{
//
go func() {
for
t
:=
range
time
.
NewTicker
(
2
*
time
.
Second
)
.
C
{
//
for t := range time.NewTicker(2 * time.Second).C {
_
=
t
//
_ = t
printReport
(
zLogger
)
//
printReport(zLogger)
}
//
}
}()
//
}()
<-
close
<-
close
}
}
...
@@ -176,18 +175,18 @@ func getMyIP() string {
...
@@ -176,18 +175,18 @@ func getMyIP() string {
}
}
// used only for debugging puropose
// used only for debugging puropose
func
printReport
(
log
*
zap
.
SugaredLogger
)
{
//
func printReport(log *zap.SugaredLogger) {
if
Discovery
==
nil
||
Selection
==
nil
{
//
if Discovery == nil || Selection == nil {
return
//
return
}
//
}
knownPeers
:=
Discovery
.
GetVerifiedPeers
()
//
knownPeers := Discovery.GetVerifiedPeers()
incoming
:=
[]
*
peer
.
Peer
{}
//
incoming := []*peer.Peer{}
outgoing
:=
[]
*
peer
.
Peer
{}
//
outgoing := []*peer.Peer{}
if
Selection
!=
nil
{
//
if Selection != nil {
incoming
=
Selection
.
GetIncomingNeighbors
()
//
incoming = Selection.GetIncomingNeighbors()
outgoing
=
Selection
.
GetOutgoingNeighbors
()
//
outgoing = Selection.GetOutgoingNeighbors()
}
//
}
log
.
Info
(
"Known peers:"
,
len
(
knownPeers
))
//
log.Info("Known peers:", len(knownPeers))
log
.
Info
(
"Chosen:"
,
len
(
outgoing
))
//
log.Info("Chosen:", len(outgoing))
log
.
Info
(
"Accepted:"
,
len
(
incoming
))
//
log.Info("Accepted:", len(incoming))
}
//
}
This diff is collapsed.
Click to expand it.
plugins/gossip/gossip.go
+
2
−
2
View file @
97172be5
...
@@ -18,7 +18,7 @@ import (
...
@@ -18,7 +18,7 @@ import (
const
defaultZLC
=
`{
const
defaultZLC
=
`{
"level": "info",
"level": "info",
"development": false,
"development": false,
"outputPaths": ["
stdout
"],
"outputPaths": ["
./gossip.log
"],
"errorOutputPaths": ["stderr"],
"errorOutputPaths": ["stderr"],
"encoding": "console",
"encoding": "console",
"encoderConfig": {
"encoderConfig": {
...
@@ -37,7 +37,7 @@ const defaultZLC = `{
...
@@ -37,7 +37,7 @@ const defaultZLC = `{
}`
}`
var
(
var
(
debugLevel
=
"
debug
"
debugLevel
=
"
info
"
zLogger
*
zap
.
SugaredLogger
zLogger
*
zap
.
SugaredLogger
mgr
*
gp
.
Manager
mgr
*
gp
.
Manager
)
)
...
...
This diff is collapsed.
Click to expand it.
runNetwork.sh
+
1
−
1
View file @
97172be5
...
@@ -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
.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
2TwlC5mtYVrCHNKG8zkFWmEUlL0pJPS1DOOC2U4yjwo
=
@127.0.0.1:14626
--node
.LogLevel 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