diff --git a/metadium/admin.go b/metadium/admin.go index 08d77a529488..330a6e5ce3c6 100644 --- a/metadium/admin.go +++ b/metadium/admin.go @@ -256,7 +256,7 @@ func (ma *metaAdmin) getMinerNodes(height int, locked bool) (*metaNode, *metaNod }) for _, n := range nodes { - if (ma.self != nil && n.Id == ma.self.Id) || ma.isPeerUp(n.Idv4) { + if (ma.self != nil && n.Id == ma.self.Id) || ma.isPeerUp(n.Id) { n.Status = "up" } else { n.Status = "down" @@ -1246,12 +1246,12 @@ func getMiners(id string, timeout int) []*metaapi.MetadiumMinerStatus { if admin.self != nil && admin.self.Id == node.Id { miners = append(miners, getMinerStatus()) return miners - } else if !admin.isPeerUp(node.Idv4) { + } else if !admin.isPeerUp(node.Id) { miners = append(miners, getDownStatus(node)) return miners } - err = admin.rpcCli.CallContext(ctx, nil, "admin_requestMinerStatus", &node.Idv4) + err = admin.rpcCli.CallContext(ctx, nil, "admin_requestMinerStatus", &node.Id) if err != nil { log.Error("Metadium RequestMinerStatus Failed", "id", node.Id, "error", err) status := getDownStatus(node) @@ -1266,12 +1266,12 @@ func getMiners(id string, timeout int) []*metaapi.MetadiumMinerStatus { if admin.self != nil && admin.self.Id == n.Id { miners = append(miners, getMinerStatus()) continue - } else if !admin.isPeerUp(n.Idv4) { + } else if !admin.isPeerUp(n.Id) { miners = append(miners, getDownStatus(n)) continue } - err = admin.rpcCli.CallContext(ctx, nil, "admin_requestMinerStatus", n.Idv4) + err = admin.rpcCli.CallContext(ctx, nil, "admin_requestMinerStatus", n.Id) if err != nil { status := getDownStatus(n) status.RttMs = big.NewInt((time.Now().UnixNano() - startTime) / 1000000) diff --git a/metadium/etcdutil.go b/metadium/etcdutil.go index 8483204e85ee..199b88340731 100644 --- a/metadium/etcdutil.go +++ b/metadium/etcdutil.go @@ -346,7 +346,7 @@ func (ma *metaAdmin) etcdJoin(name string) error { timer := time.NewTimer(30 * time.Second) ctx, cancel := context.WithCancel(context.Background()) - err := admin.rpcCli.CallContext(ctx, nil, "admin_requestEtcdAddMember", &node.Idv4) + err := admin.rpcCli.CallContext(ctx, nil, "admin_requestEtcdAddMember", &node.Id) cancel() if err != nil { log.Error("Metadium admin_requestEtcdAddMember failed", "id", node.Id, "error", err) @@ -547,7 +547,7 @@ func EtcdStart() { } admin.lock.Unlock() - if node != nil && admin.isPeerUp(node.Idv4) { + if node != nil && admin.isPeerUp(node.Id) { log.Info("Metadium", "Trying to join", node.Name) admin.etcdJoin(node.Name) } diff --git a/vendor/vendor.json b/vendor/vendor.json index 85992fbf09c1..040fb6b6e244 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1271,8 +1271,8 @@ { "checksumSHA1": "vKbPb9fpjCdzuoOvajOJnYfHG2g=", "path": "golang.org/x/crypto/poly1305", - "revision": "e3636079e1a4c1f337f212cc5cd2aca108f6c900", - "revisionTime": "2018-09-26T22:24:25Z" + "revision": "ff983b9c42bc9fbf91556e191cc8efb585c16908", + "revisionTime": "2018-07-25T11:53:45Z" }, { "checksumSHA1": "vKbPb9fpjCdzuoOvajOJnYfHG2g=",