feat: update ContractManager

add ContractManager.getExecutor to get the executor of some contract
This commit is contained in:
Frank.R.Wu 2022-02-08 22:49:55 +08:00
parent 2b595271c9
commit 3dec7e9f47

View File

@ -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();
}