Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Xia committed Mar 14, 2019
1 parent d2afa05 commit 5ff975e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.vscode/
.vscode/*
.vscode/*
*.log
client
5 changes: 3 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"io"
"log"
"math"
"math/rand"
"net"
"os"
Expand Down Expand Up @@ -155,8 +156,8 @@ func ParseGossipingMessage(gossipRawMsg string) (int, string) {
func sendGossipingMsg(node *Node, header string, round int, mesg string) {
gossipMesg := ""
for {
// NumMembers := node.MembersSet.Size()
maxRound := 6 //int(10 * math.Log(float64(NumMembers))) // TODO: Change to a constant
NumMembers := node.MembersSet.Size()
maxRound := int(4 * math.Log(float64(NumMembers))) // TODO: Change to a constant
if round > maxRound {
break
}
Expand Down

0 comments on commit 5ff975e

Please sign in to comment.