mirror of
https://gitee.com/BDWare/cp.git
synced 2025-01-09 17:34:08 +00:00
prune old doi logic
This commit is contained in:
parent
2514980e8b
commit
841f567a88
@ -48,7 +48,7 @@ dependencies {
|
||||
implementation 'com.sun.mail:javax.mail:1.6.2'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
|
||||
implementation 'org.bdware.bdcontract:sdk-java:1.0.2'
|
||||
implementation 'org.bdware.doip:doip-audit-tool:1.1.9'
|
||||
implementation 'org.bdware.doip:doip-audit-tool:1.2.0'
|
||||
implementation 'org.bdware.doip:doip-sdk:1.3.8'
|
||||
implementation fileTree(dir: 'lib', include: '*.jar')
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
@ -67,8 +67,8 @@ jar {
|
||||
// uncomment this when publish,
|
||||
// while develop at local use "false"
|
||||
configurations.runtimeClasspath.filter {
|
||||
it.getAbsolutePath().contains("/lib/")
|
||||
// false
|
||||
//it.getAbsolutePath().contains("/lib/")
|
||||
false
|
||||
}.collect {
|
||||
it.isDirectory() ? it : zipTree(it)
|
||||
}
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user