diff --git a/src/main/java/org/bdware/sc/ContractManager.java b/src/main/java/org/bdware/sc/ContractManager.java index 6ed3def..40dc459 100644 --- a/src/main/java/org/bdware/sc/ContractManager.java +++ b/src/main/java/org/bdware/sc/ContractManager.java @@ -792,14 +792,9 @@ public class ContractManager { public String startContractAndRedirect(Contract c, PrintStream ps, String alias, boolean isDebug) { long freeMemory = getFreeMemory(); - if (freeMemory < memoryLimit || statusRecorder.runningProcess.size() > 8) { + if (statusRecorder.runningProcess.size() > 5 && (freeMemory < memoryLimit)) { statusRecorder.hangLeastUsedContractProcess(); - // ContractResult r = - // new ContractResult( - // Status.Error, new JsonPrimitive("insufficient memory:" + freeMemory)); - // return JsonUtil.toJson(r); } - // SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); ContractResult r; try { if (c.getScriptStr().startsWith("/")) { @@ -2200,7 +2195,7 @@ public class ContractManager { } public JsonElement getLedgerParams() { - return chainOpener.getLedgerParams(); + return chainOpener.getLedgerParams(); } // 合约状态