merge dengshuang-feature

refactor: NetworkManager
This commit is contained in:
CaiHQ 2021-11-21 23:20:44 +08:00
parent f150621008
commit 3ab558bf10

View File

@ -1464,6 +1464,22 @@ public class NodeCenterActions {
return info;
}
@Action(async = true)
public void queryNodeAddress(JsonObject args, final ResultCallback rc) {
args.addProperty("action", "onQueryNodeAddress");
args.add("responseID", args.get("requestID"));
args.add("result", JsonNull.INSTANCE);
String nodePubkey = args.get("pubKey").getAsString();
CMNode nodeInfo = nodeInfos.get(nodePubkey);
if (nodeInfo != null) {
JsonObject jo = new JsonObject();
jo.addProperty("pubKey", nodePubkey);
jo.addProperty("masterAddress", nodeInfo.masterAddress);
args.add("result", jo);
}
rc.onResult(args);
}
@Action(async = true)
public void queryRouteInfo(JsonObject args, final ResultCallback rc) {
String contractID = args.get("contractID").getAsString();
@ -1685,6 +1701,7 @@ public class NodeCenterActions {
controller.sendMsg(JsonUtil.toJson(to));
}
@Action(async = true)
public void askElectMasterTimeRecorder(JsonObject args, ResultCallback resultCallback) {
String data = "null";