Skip to content
Snippets Groups Projects
Unverified Commit 8f5d0e6d authored by Hans Moog's avatar Hans Moog Committed by GitHub
Browse files

Merge branch 'develop' into develop.mergeBinary

parents 2c5e031a 5ba8b574
No related branches found
No related tags found
No related merge requests found
......@@ -27,11 +27,10 @@ VOLUME /app/mainnetdb
EXPOSE 14666/tcp
EXPOSE 14626/udp
EXPOSE 14626/tcp
# Copy the Pre-built binary file from the previous stage
COPY --from=build /go/bin/goshimmer .
# Copy the docker config
COPY docker.config.json config.json
COPY config.json config.json
ENTRYPOINT ["./goshimmer"]
{
"analysis": {
"serveraddress": "ressims.iota.cafe:188",
"serverport": 0
},
"autopeering": {
"address": "0.0.0.0",
"entrynodes": [
"V8LYtWWcPYYDTTXLeIEFjJEuWlsjDiI0+Pq/Cx9ai6g=@116.202.49.178:14626"
],
"port": 14626
},
"database": {
"directory": "mainnetdb"
},
"gossip": {
"port": 14666
},
"logger": {
"Level": "info",
"DisableCaller": true,
"DisableStacktrace": false,
"Encoding": "console",
"OutputPaths": [
"stdout",
"goshimmer.log"
],
"DisableEvents": true
},
"node": {
"disablePlugins": [],
"enablePlugins": []
}
}
......@@ -30,7 +30,7 @@ import (
)
func main() {
go http.ListenAndServe("localhost:6060", nil) // pprof Server for Debbuging Mutexes
go http.ListenAndServe("localhost:6061", nil) // pprof Server for Debbuging Mutexes
testTxId := transaction.NewId([]byte("Test"))
......
......@@ -11,6 +11,7 @@ import (
"github.com/iotaledger/goshimmer/packages/netutil/buffconn"
"github.com/iotaledger/hive.go/autopeering/peer"
"github.com/iotaledger/hive.go/logger"
"go.uber.org/atomic"
)
var (
......@@ -21,6 +22,7 @@ var (
const (
neighborQueueSize = 5000
maxNumReadErrors = 10
droppedMessagesThreshold = 1000
)
type Neighbor struct {
......@@ -29,6 +31,7 @@ type Neighbor struct {
log *logger.Logger
queue chan []byte
messagesDropped atomic.Int32
wg sync.WaitGroup
closing chan struct{}
......@@ -150,6 +153,10 @@ func (n *Neighbor) Write(b []byte) (int, error) {
case <-n.closing:
return 0, nil
default:
if n.messagesDropped.Inc() >= droppedMessagesThreshold {
n.messagesDropped.Store(0)
return 0, ErrNeighborQueueFull
}
return 0, nil
}
}
......@@ -87,8 +87,8 @@ func TestNeighborParallelWrite(t *testing.T) {
go func() {
defer wg.Done()
for i := 0; i < neighborQueueSize; i++ {
_, err := neighborA.Write(testData)
if err == ErrNeighborQueueFull {
l, err := neighborA.Write(testData)
if err == ErrNeighborQueueFull || l == 0 {
continue
}
assert.NoError(t, err)
......@@ -99,8 +99,8 @@ func TestNeighborParallelWrite(t *testing.T) {
go func() {
defer wg.Done()
for i := 0; i < neighborQueueSize; i++ {
_, err := neighborA.Write(testData)
if err == ErrNeighborQueueFull {
l, err := neighborA.Write(testData)
if err == ErrNeighborQueueFull || l == 0 {
continue
}
assert.NoError(t, err)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment