新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!

Commit 6c000247 authored by tianle's avatar tianle

Merge branch 'v2.3.1_qc_fix_contract' into 'v2.3.1_qc' (merge request !189)

fix: Random contract err --bug=1004836
fix: Random contract err
--bug=1004836
parents e5031f52 33230823
......@@ -1185,6 +1185,9 @@ func (r *ContractManagerRuntime) checkGoContractVersion(contract *commonPb.Contr
unzipCommand := fmt.Sprintf("7z e %s -o%s -y", contractZipPath, tmpContractDir) // contract1
err = runCmd(unzipCommand)
if err != nil {
if strings.Contains(err.Error(), tmpContractDir) {
return nil, fmt.Errorf("failed to extract contract")
}
return nil, fmt.Errorf("failed to extract contract, %v", err)
}
......@@ -1200,6 +1203,9 @@ func (r *ContractManagerRuntime) checkGoContractVersion(contract *commonPb.Contr
fileInfoList, err := ioutil.ReadDir(tmpContractDir)
if err != nil {
r.log.Errorf("failed to read tmp contract dir %s, %v", tmpContractDir, err)
if strings.Contains(err.Error(), tmpContractDir) {
return nil, fmt.Errorf("failed to read tmp contract dir")
}
return nil, fmt.Errorf("failed to read tmp contract dir, %v", err)
}
......@@ -1223,6 +1229,9 @@ func (r *ContractManagerRuntime) checkGoContractVersion(contract *commonPb.Contr
extBytecode, err = ioutil.ReadFile(fp)
if err != nil {
r.log.Errorf("read from byteCode file %s failed, %s", fp, err)
if strings.Contains(err.Error(), tmpContractDir) {
return nil, fmt.Errorf("read from byteCode file failed")
}
return nil, fmt.Errorf("read from byteCode file failed, %s", err)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment