parent
05f35fff3d
commit
c2209baa37
@ -1,12 +1,26 @@ |
|||||||
package main |
package main |
||||||
|
|
||||||
import ( |
import ( |
||||||
|
"flag" |
||||||
"fmt" |
"fmt" |
||||||
|
|
||||||
"github.com/simple-rules/harmony-benchmark/beaconchain" |
"github.com/simple-rules/harmony-benchmark/beaconchain" |
||||||
|
"github.com/simple-rules/harmony-benchmark/node" |
||||||
|
"github.com/simple-rules/harmony-benchmark/p2p" |
||||||
) |
) |
||||||
|
|
||||||
func main() { |
func main() { |
||||||
bc := beaconchain.New("temp") |
bc := beaconchain.New("temp") |
||||||
|
|
||||||
|
ip := flag.String("ip", "127.0.0.0", "IP of the node") |
||||||
|
port := flag.String("port", "9000", "port of the node.") |
||||||
|
flag.Parse() |
||||||
|
peer := p2p.Peer{Ip: *ip, Port: *port} |
||||||
|
node := node.Node{} |
||||||
|
node.Self = peer |
||||||
|
msg := node.SerializeNode() |
||||||
|
fmt.Print(msg) |
||||||
|
// fmt.Println(ip)
|
||||||
|
// fmt.Println(peer)
|
||||||
fmt.Print(bc) |
fmt.Print(bc) |
||||||
} |
} |
||||||
|
@ -0,0 +1,24 @@ |
|||||||
|
package main |
||||||
|
|
||||||
|
import ( |
||||||
|
"flag" |
||||||
|
"fmt" |
||||||
|
|
||||||
|
"github.com/simple-rules/harmony-benchmark/node" |
||||||
|
"github.com/simple-rules/harmony-benchmark/p2p" |
||||||
|
) |
||||||
|
|
||||||
|
func main() { |
||||||
|
|
||||||
|
ip := flag.String("ip", "127.0.0.0", "IP of the node") |
||||||
|
port := flag.String("port", "9000", "port of the node.") |
||||||
|
flag.Parse() |
||||||
|
peer := p2p.Peer{Ip: *ip, Port: *port} |
||||||
|
node := node.Node{} |
||||||
|
node.Self = peer |
||||||
|
msg := node.SerializeNode() |
||||||
|
fmt.Print(msg) |
||||||
|
// fmt.Println(ip)
|
||||||
|
// fmt.Println(peer)
|
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue