Richard Liu 6 years ago
commit 8c5bab09df
  1. 18
      runwait/run_wait.go
  2. 1
      utils/utils.go

@ -7,12 +7,12 @@ package main
// "github.com/simple-rules/harmony-benchmark/waitnode"
// )
// func main() {
// ip := flag.String("ip", "127.0.0.0", "IP of the node")
// port := flag.String("port", "8080", "port of the node")
// flag.Parse()
// peer := p2p.Peer{Ip: *ip, Port: *port}
// idcpeer := p2p.Peer{Ip: "localhost", Port: "9000"} //Hardcoded here.
// node := waitnode.New(peer)
// node.ConnectIdentityChain(idcpeer)
// }
func main() {
// ip := flag.String("ip", "127.0.0.0", "IP of the node")
// port := flag.String("port", "8080", "port of the node")
// flag.Parse()
// peer := p2p.Peer{Ip: *ip, Port: *port}
// idcpeer := p2p.Peer{Ip: "localhost", Port: "9000"} //Hardcoded here.
// node := waitnode.New(peer)
// node.ConnectIdentityChain(idcpeer)
}

@ -21,6 +21,7 @@ func ConvertFixedDataIntoByteArray(data interface{}) []byte {
return buff.Bytes()
}
// TODO(minhdoan): this is probably a hack, probably needs some strong non-collision hash.
func GetUniqueIdFromPeer(peer p2p.Peer) uint16 {
reg, err := regexp.Compile("[^0-9]+")
if err != nil {

Loading…
Cancel
Save