From 3dec7e9f47922c72a8794562cbb14f35e211dff5 Mon Sep 17 00:00:00 2001 From: "Frank.R.Wu" Date: Tue, 8 Feb 2022 22:49:55 +0800 Subject: [PATCH] feat: update ContractManager add ContractManager.getExecutor to get the executor of some contract --- src/main/java/org/bdware/sc/ContractManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/bdware/sc/ContractManager.java b/src/main/java/org/bdware/sc/ContractManager.java index 6275f82..60fea1b 100644 --- a/src/main/java/org/bdware/sc/ContractManager.java +++ b/src/main/java/org/bdware/sc/ContractManager.java @@ -24,6 +24,7 @@ import org.bdware.sc.units.MultiContractMeta; import org.bdware.sc.units.RespCache; import org.bdware.sc.util.JsonUtil; import org.bdware.sc.util.VersionUtil; +import org.bdware.server.trustedmodel.ContractExecutor; import org.bdware.server.trustedmodel.SingleNodeExecutor; import org.hyperic.sigar.Mem; import org.hyperic.sigar.ProcMem; @@ -2202,6 +2203,10 @@ public class ContractManager { eventBroker.doSubscribe(topic, new WSClientConsumer(channel)); } + public ContractExecutor getExecutor(String contractID) { + return statusRecorder.getContractMeta(contractID).contractExecutor; + } + public JsonElement getLedgerParams() { return chainOpener.getLedgerParams(); }