@ -115,10 +115,7 @@ var (
logConn = flag.Bool("log_conn", false, "log incoming/outgoing connections")
)
func main() {
func initSetup() {
flag.Var(&utils.BootNodes, "bootnodes", "a list of bootnode multiaddress")
flag.Parse()
if *versionFlag {
printVersion(os.Args[0])
}
@ -139,6 +136,18 @@ func main() {
utils.BootNodes = bootNodeAddrs
func createGlobalConfig() *nodeconfig.ConfigType {
nodeConfig := nodeconfig.GetGlobalConfig()
return nodeConfig
initSetup()
var shardID = "0"
var peers []p2p.Peer
@ -82,6 +82,10 @@ func GetConfigs(index int) *ConfigType {
return &configs[index]
func GetGlobalConfig() *ConfigType {
return GetConfigs(Global)
func (conf *ConfigType) String() string {
return fmt.Sprintf("%s/%s/%s:%v,%v,%v:%v", conf.beacon, conf.group, conf.client, conf.isClient, conf.isBeacon, conf.isLeader, conf.shardID)