Merge remote-tracking branch 'origin/yf_preview' into dev_jby_preview

This commit is contained in:
wuwei1972 2019-03-22 15:01:58 +08:00
commit 767b1b30ca

View File

@ -289,8 +289,13 @@ class TransProcessor(name: String, da:String, parent: ActorRef) extends Actor {
val sr = ImpDataAccess.GetDataAccess(sTag)
val state_bytes = sr.Get(key_tx_state)
//合约不存在
if(state_bytes == null)
throw new SandboxException(ERR_INVOKE_CHAINCODE_NOT_EXIST)
if(state_bytes == null){
//进一步检查sn对应actor,判断是否存在合约正在deploying
val sn = PRE_SUB_ACTOR+tx_cid
val cref = context.child(sn)
if(cref == None)
throw new SandboxException(ERR_INVOKE_CHAINCODE_NOT_EXIST)
}
else{
val state = deserialise(state_bytes).asInstanceOf[Boolean]
Sandbox.setContractState(tx_cid, state)