repchain2.0-update100:修复RepChain API接收交易时的预执行功能。

This commit is contained in:
jiangbuyun 2022-08-08 22:54:39 +08:00
parent 5ce5e38c5e
commit 1fbcaec29b
2 changed files with 11 additions and 2 deletions

View File

@ -95,7 +95,7 @@ system {
number_of_transProcessor = 10#
has_preload_trans_of_api = false#API接收交易时是否做交易的预执行检查。默认值true
has_preload_trans_of_api = true#API接收交易时是否做交易的预执行检查。默认值true
is_verify_of_endorsement = true#在出块时背书节点是否验证交易默认值true

View File

@ -254,7 +254,8 @@ class SandboxDispatcher(moduleName: String, cid: String) extends ModuleBase(modu
RepLogger.debug(RepLogger.Sandbox_Logger, s"sandbox dispatcher ${cid},execute setcontractstate after , contract state ${this.ContractState},txid=${special_t.id},da=${da}.")
if (this.ContractState == ContractStateType.ContractInLevelDB) {
if(this.DeployTransactionCache.getSpec.rType == ChaincodeDeploy.RunType.RUN_PARALLEL){
this.createParallelRouter(this.DeployTransactionCache.cid.get, this.DeployTransactionCache.para.spec.get.cType)
this.createParallelRouter(this.DeployTransactionCache.cid.get,
this.DeployTransactionCache.para.spec.get.cType)
RepLogger.debug(RepLogger.Sandbox_Logger, s"sandbox dispatcher ${cid},create parallel router after ,txid=${special_t.id},da=${da}.")
}
@ -273,6 +274,10 @@ class SandboxDispatcher(moduleName: String, cid: String) extends ModuleBase(modu
typeOfSender match {
case TypeOfSender.FromAPI =>
RepLogger.debug(RepLogger.Sandbox_Logger, s"sandbox dispatcher ${cid},send msg to Parallel sandbox from api,txid=${special_t.id},da=${da}.")
if(this.RouterOfParallelSandboxs == null){
this.createParallelRouter(this.DeployTransactionCache.cid.get,
this.DeployTransactionCache.para.spec.get.cType)
}
if(cacheIdentifier == null)
this.RouterOfParallelSandboxs.route(DoTransactionOfSandbox(ts, da, this.ContractState), sender)
else
@ -281,6 +286,10 @@ class SandboxDispatcher(moduleName: String, cid: String) extends ModuleBase(modu
this.DeployTransactionCache.para.spec.get.rType match {
case ChaincodeDeploy.RunType.RUN_PARALLEL =>
RepLogger.debug(RepLogger.Sandbox_Logger, s"sandbox dispatcher ${cid},send msg to Parallel sandbox from parallel,txid=${special_t.id},da=${da}.")
if(this.RouterOfParallelSandboxs == null){
this.createParallelRouter(this.DeployTransactionCache.cid.get,
this.DeployTransactionCache.para.spec.get.cType)
}
if(cacheIdentifier == null)
this.RouterOfParallelSandboxs.route(DoTransactionOfSandbox(ts, da, this.ContractState), sender)
else