feat: support jsontype in execute contract

This commit is contained in:
CaiHQ 2021-12-03 11:19:29 +08:00
parent 3c4c33bb1b
commit ecc51330db
2 changed files with 6 additions and 5 deletions

View File

@ -1524,12 +1524,13 @@ public class ContractManager {
// LOGGER.info("查看合约 " + cr.getContractID() + " 的master为 " + pubKey);
if (null != pubKey) {
if (!masterStub.hasAgentConnection(pubKey)) {
pubKey = nodeCenterConn.reRouteContract(cr.getContractID());
LOGGER.info("查看合约 " + cr.getContractID() + " 的master为 " + pubKey);
}
if (null != pubKey) {
masterStub.executeByOtherNodeAsync(pubKey, cr, rcb);
return;
// result = masterStub.executeByOtherNode(pubKey, cr);

View File

@ -87,7 +87,7 @@ public class ManagerHandler extends MsgHandler {
@Description("add distributed execution member, sample: {contractID:id/name, arg:ipAndPort}")
public void addDEMember(GetMessage msg, ResultCallback cb) {
ContractRequest cr = JsonUtil.fromJson(msg.arg, ContractRequest.class);
cb.onResult(cm.addDEMember(cr.getContractID(), cr.getArg()));
cb.onResult(cm.addDEMember(cr.getContractID(), cr.getArg().getAsString()));
}
/**