mirror of
https://gitee.com/BTAJL/repchain.git
synced 2024-12-03 04:08:40 +08:00
CHAINCODE_SET_STATE类型的交易紧跟deploy交易
This commit is contained in:
parent
3b7ff99e26
commit
febd0e51d6
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user