prune origin doi logic

This commit is contained in:
CaiHQ 2023-03-31 17:13:50 +08:00
parent af298b6ae7
commit 0d4f0243a2
2 changed files with 9 additions and 20 deletions

View File

@ -123,23 +123,14 @@ public class CMActions implements OnHashCallback {
resultCallback.onResult(MISSING_ARGUMENT);
return;
}
if (args.has("contractDOI") && !args.has("contractID")) {
LOGGER.debug("contractDOI: " + args.get("contractDOI").getAsString());
try {
cReq.setContractDOI(args.get("contractDOI").getAsString());
} catch (Exception e) {
e.printStackTrace();
resultCallback.onResult(INVALID_DOI);
return;
}
} else {
if (args.has("contractName")) {
cReq.setContractID(args.get("contractName").getAsString());
}
if (args.has("contractID")) {
cReq.setContractID(args.get("contractID").getAsString());
}
if (args.has("contractName")) {
cReq.setContractID(args.get("contractName").getAsString());
}
if (args.has("contractID")) {
cReq.setContractID(args.get("contractID").getAsString());
}
if (args.has("isDebug")) {
cReq.setFromDebug(args.get("isDebug").getAsBoolean());
}
@ -544,9 +535,9 @@ public class CMActions implements OnHashCallback {
jo.remove("isInsnLimit");
jo.remove("size");
try {
if (jo.has("result") && jo.get("result").isJsonPrimitive()){
if (jo.has("result") && jo.get("result").isJsonPrimitive()) {
String resultStr = jo.get("result").getAsString();
jo.add("result",JsonParser.parseString(resultStr));
jo.add("result", JsonParser.parseString(resultStr));
}
} catch (Exception e) {
}

View File

@ -226,8 +226,6 @@ public class ContractRepositoryHandler extends RepositoryHandlerBase implements
ContractRequest cr = new ContractRequest();
cr.setContractID(cc.getContractID());
cr.setContractDOI(doipMessage.header.parameters.id);
if (args.has("withDynamicAnalysis")) cr.withDynamicAnalysis = args.get("withDynamicAnalysis").getAsBoolean();
if (args.has("withEvaluatesAnalysis"))
cr.withEvaluatesAnalysis = args.get("withEvaluatesAnalysis").getAsBoolean();