mirror of
https://gitee.com/BDWare/cp.git
synced 2026-01-29 01:29:27 +00:00
prune old doi logic
This commit is contained in:
@@ -718,11 +718,6 @@ public class ContractProcess {
|
||||
onStartingDoipServer.setArg(arg);
|
||||
LOGGER.debug("invoke onStartingDoipServer, param:" + onStartingDoipServer.getArg().toString());
|
||||
onStartingDoipServer.setRequester(contract.getOwner());
|
||||
if (contract.getDoipFlag() && null != contract.getDOI() && !contract.getDOI().isEmpty()) {
|
||||
onStartingDoipServer.setRequesterDOI(contract.getDOI());
|
||||
} else {
|
||||
onStartingDoipServer.setRequesterDOI("empty");
|
||||
}
|
||||
FunctionNode funNode = cn.getFunction("onServerStart");
|
||||
|
||||
try {
|
||||
@@ -735,6 +730,7 @@ public class ContractProcess {
|
||||
LOGGER.info("Fetch the onStartingDoipServerRes from router successfully, the result is " + onStartingDoipServerRes);
|
||||
int doipListenPort = DoipClusterServer.startDoipServer(startPort);
|
||||
returnValue.addProperty("doipListenPort", doipListenPort);
|
||||
this.contract.setDoipPort(doipListenPort);
|
||||
returnValue.addProperty("doipStartPort", startPort);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("DoipLocalSingleton cannot starts properly, plz check the onServerStart function");
|
||||
@@ -800,9 +796,6 @@ public class ContractProcess {
|
||||
}
|
||||
|
||||
JavaScriptEntry.setSM2KeyPair(contract.getPublicKey(), contract.getKey());
|
||||
if (null != contract.getDOI() && !contract.getDOI().isEmpty()) {
|
||||
JavaScriptEntry.doi = contract.getDOI();
|
||||
}
|
||||
if (null != contract.getAuthInfoPersistDOI()
|
||||
&& !contract.getAuthInfoPersistDOI().isEmpty()) {
|
||||
JavaScriptEntry.authInfoPersistDOI = contract.getAuthInfoPersistDOI();
|
||||
@@ -819,11 +812,6 @@ public class ContractProcess {
|
||||
onCreate.setArg(arg);
|
||||
LOGGER.debug("invoke onCreate, param:" + onCreate.getArg().toString());
|
||||
onCreate.setRequester(contract.getOwner());
|
||||
if (contract.getDoipFlag() && null != contract.getDOI() && !contract.getDOI().isEmpty()) {
|
||||
onCreate.setRequesterDOI(contract.getDOI());
|
||||
} else {
|
||||
onCreate.setRequesterDOI("empty");
|
||||
}
|
||||
FunctionNode funNode = cn.getFunction("onCreate");
|
||||
return invoke(onCreate, funNode);
|
||||
}
|
||||
@@ -841,13 +829,6 @@ public class ContractProcess {
|
||||
else
|
||||
onRecover.setArg(arg);
|
||||
onRecover.setRequester(contract.getOwner());
|
||||
if (contract.getDoipFlag()
|
||||
&& (contract.getDOI() != null)
|
||||
&& (contract.getDOI().length() > 0)) {
|
||||
onRecover.setRequesterDOI(contract.getDOI());
|
||||
} else {
|
||||
onRecover.setRequesterDOI("empty");
|
||||
}
|
||||
FunctionNode funNode = cn.getFunction("onRecover");
|
||||
return invoke(onRecover, funNode);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,6 @@ public class JavaScriptEntry {
|
||||
// public static int contractManagerPort;
|
||||
public static Random random;
|
||||
public static long invokeID;
|
||||
public static String doi;
|
||||
public static String authInfoPersistDOI;
|
||||
public static SocketGet get; // public static CloseableHttpClient httpClient = getHttpClient();
|
||||
public static int numOfCopies;
|
||||
@@ -180,7 +179,6 @@ public class JavaScriptEntry {
|
||||
if (!app.verifySignature()) {
|
||||
return "{\"status\":\"Exception\",\"data\":\"invalid signature\"}";
|
||||
}
|
||||
app.setRequesterDOI(doi);
|
||||
app.setFromDebug(isDebug);
|
||||
if (numOfCopies > 1) {
|
||||
// The caller is special.
|
||||
@@ -237,7 +235,6 @@ public class JavaScriptEntry {
|
||||
ContractRequest app = new ContractRequest();
|
||||
app.setContractID(contractID).setAction(action).setArg(JSONTool.convertMirrorToJson(arg));
|
||||
app.doSignature(keyPair);
|
||||
app.setRequesterDOI(doi);
|
||||
app.setFromDebug(isDebug);
|
||||
ContractExecType type = ContractProcess.instance.getContract().getType();
|
||||
if (type.needSeq()) {
|
||||
@@ -323,7 +320,6 @@ public class JavaScriptEntry {
|
||||
app.setContractID(contractID).setAction(action).setArg(arg);
|
||||
app.doSignature(keyPair);
|
||||
app.setRequestID((invokeID++) + "_" + random());
|
||||
app.setRequesterDOI(doi);
|
||||
get.asyncGet(
|
||||
"dd",
|
||||
"executeContract",
|
||||
|
||||
@@ -93,7 +93,6 @@ public class AsyncUtil {
|
||||
app.setContractID(contractID).setAction(action).setArg(arg);
|
||||
app.doSignature(JavaScriptEntry.getKeyPair());
|
||||
app.setRequestID((JavaScriptEntry.invokeID++) + "_" + JavaScriptEntry.random());
|
||||
app.setRequesterDOI(JavaScriptEntry.doi);
|
||||
JavaScriptEntry.get.asyncGet(
|
||||
"dd",
|
||||
"executeContract",
|
||||
|
||||
Reference in New Issue
Block a user