temp fix for enabling travis

pull/5/head
Richard Liu 7 years ago
parent 1e513669e3
commit 7bd78e56a2
  1. 2
      aws-code/dial.go
  2. 2
      aws-code/listen.go
  3. 6
      consensus/consensus_leader.go
  4. 10
      consensus/consensus_validator.go

@ -6,7 +6,7 @@ import (
"net"
)
func main() {
func dialMain() { // TODO: temp fix to unblock test
conn, err := net.Dial("tcp", ":9000")
if err != nil {
panic(err)

@ -7,7 +7,7 @@ import (
"time"
)
func main() {
func listenMain() { // TODO: temp fix to unblock test
ln, err := net.Listen("tcp", "localhost:9000")
if err != nil {
panic(err)

@ -39,17 +39,17 @@ func (consensus *Consensus) ProcessMessageLeader(message []byte) {
log.Printf("[Leader] Received and processing message: %s\n", msgType)
switch msgType {
case ANNOUNCE:
log.Println("Unexpected message type: %s", msgType)
log.Printf("Unexpected message type: %s", msgType)
case COMMIT:
consensus.processCommitMessage(payload)
case CHALLENGE:
log.Println("Unexpected message type: %s", msgType)
log.Printf("Unexpected message type: %s", msgType)
case RESPONSE:
consensus.processResponseMessage(payload)
case START_CONSENSUS:
consensus.processStartConsensusMessage(payload)
default:
log.Println("Unexpected message type: %s", msgType)
log.Printf("Unexpected message type: %s", msgType)
}
}

@ -1,10 +1,10 @@
package consensus
import (
"harmony-benchmark/p2p"
"log"
"bytes"
"encoding/binary"
"harmony-benchmark/p2p"
"log"
)
// Validator's consensus message dispatcher
@ -24,13 +24,13 @@ func (consensus *Consensus) ProcessMessageValidator(message []byte) {
case ANNOUNCE:
consensus.processAnnounceMessage(payload)
case COMMIT:
log.Println("Unexpected message type: %s", msgType)
log.Printf("Unexpected message type: %s", msgType)
case CHALLENGE:
consensus.processChallengeMessage(payload)
case RESPONSE:
log.Println("Unexpected message type: %s", msgType)
log.Printf("Unexpected message type: %s", msgType)
default:
log.Println("Unexpected message type: %s", msgType)
log.Printf("Unexpected message type: %s", msgType)
}
}

Loading…
Cancel
Save