Skip to content

Commit

Permalink
Minor updates
Browse files Browse the repository at this point in the history
Adjusted the incrementation logic on auto-epoching, removed a useless comment.
  • Loading branch information
name committed Apr 26, 2019
1 parent e827cd7 commit b23bb49
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion cmd/phantom/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ func sendPings(connectionSet map[string]*phantom.PingerConnection, peerSet map[s

if sleepTime > 0 {
fmt.Println("Sleeping for ", sleepTime.String())
//log.Println("SLEEPING FOR: " + sleepTime.String())
time.Sleep(sleepTime)
}

Expand Down
3 changes: 1 addition & 2 deletions pkg/phantom/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ func GeneratePingsFromMasternodeFile(filePath string, pingChannel chan Masternod
if len(fields) == 5 {
log.Println("No epoch time found for: ", fields[0], " assuming one.")
fields = append(fields, strconv.FormatInt(currentTime.Add(time.Duration(i*5) * time.Second).Unix() - 540, 10))
i++
}

if len(fields) != 6 {
Expand All @@ -131,8 +132,6 @@ func GeneratePingsFromMasternodeFile(filePath string, pingChannel chan Masternod
}

pings = append(pings, MasternodePing{fields[0], fields[3], uint32(outputIndex), fields[2], determinePingTime(fields[5]), magicMessage, sentinelVersion, daemonVersion, queue})

i++
}

//sort the pings by time
Expand Down

0 comments on commit b23bb49

Please sign in to comment.