mirror of
https://gitee.com/BDWare/cm
synced 2025-01-10 09:54:03 +00:00
feat: support jsontype in execute contract
This commit is contained in:
parent
3c4c33bb1b
commit
ecc51330db
@ -1524,12 +1524,13 @@ public class ContractManager {
|
|||||||
|
|
||||||
// LOGGER.info("查看合约 " + cr.getContractID() + " 的master为 " + pubKey);
|
// LOGGER.info("查看合约 " + cr.getContractID() + " 的master为 " + pubKey);
|
||||||
|
|
||||||
if (!masterStub.hasAgentConnection(pubKey)) {
|
|
||||||
pubKey = nodeCenterConn.reRouteContract(cr.getContractID());
|
|
||||||
LOGGER.info("查看合约 " + cr.getContractID() + " 的master为 " + pubKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (null != pubKey) {
|
if (null != pubKey) {
|
||||||
|
if (!masterStub.hasAgentConnection(pubKey)) {
|
||||||
|
pubKey = nodeCenterConn.reRouteContract(cr.getContractID());
|
||||||
|
LOGGER.info("查看合约 " + cr.getContractID() + " 的master为 " + pubKey);
|
||||||
|
}
|
||||||
masterStub.executeByOtherNodeAsync(pubKey, cr, rcb);
|
masterStub.executeByOtherNodeAsync(pubKey, cr, rcb);
|
||||||
return;
|
return;
|
||||||
// result = masterStub.executeByOtherNode(pubKey, cr);
|
// result = masterStub.executeByOtherNode(pubKey, cr);
|
||||||
|
@ -87,7 +87,7 @@ public class ManagerHandler extends MsgHandler {
|
|||||||
@Description("add distributed execution member, sample: {contractID:id/name, arg:ipAndPort}")
|
@Description("add distributed execution member, sample: {contractID:id/name, arg:ipAndPort}")
|
||||||
public void addDEMember(GetMessage msg, ResultCallback cb) {
|
public void addDEMember(GetMessage msg, ResultCallback cb) {
|
||||||
ContractRequest cr = JsonUtil.fromJson(msg.arg, ContractRequest.class);
|
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()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user