The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
woop/runwait/run_wait.go

31 lines
596 B

6 years ago
package main
6 years ago
import (
"flag"
"fmt"
"time"
6 years ago
"github.com/simple-rules/harmony-benchmark/node"
"github.com/simple-rules/harmony-benchmark/p2p"
)
6 years ago
func main() {
6 years ago
ip := flag.String("ip", "localhost", "IP of the node")
6 years ago
port := flag.String("port", "8080", "port of the node")
flag.Parse()
i := 0
6 years ago
peer := p2p.Peer{Ip: *ip, Port: *port}
fmt.Println("Now onto node i", i)
6 years ago
idcpeer := p2p.Peer{Ip: "localhost", Port: "9000"} //Hardcoded here.
node := node.NewWaitNode(peer, idcpeer)
6 years ago
go func() {
node.ConnectIdentityChain()
}()
node.StartServer(*port)
time.Sleep(5 * time.Second)
//}
6 years ago
}