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

Commit cc600bdd authored by mosesyzding's avatar mosesyzding

feat:modify getContractInfo, --story=1012324

parent 06706aac
...@@ -311,22 +311,21 @@ func (r *ContractManagerRuntime) fetchDisabledContractList(txSimContext protocol ...@@ -311,22 +311,21 @@ func (r *ContractManagerRuntime) fetchDisabledContractList(txSimContext protocol
func (r *ContractManagerRuntime) getContractInfo(txSimContext protocol.TxSimContext, parameters map[string][]byte) ( func (r *ContractManagerRuntime) getContractInfo(txSimContext protocol.TxSimContext, parameters map[string][]byte) (
[]byte, error) { []byte, error) {
name := string(parameters[syscontract.GetContractInfo_CONTRACT_NAME.String()]) name := string(parameters[syscontract.GetContractInfo_CONTRACT_NAME.String()])
contract, err := r.GetContractInfo(txSimContext, name) cfg, err := txSimContext.GetBlockchainStore().GetLastChainConfig()
if err != nil { if err != nil {
cfg, e := txSimContext.GetBlockchainStore().GetLastChainConfig() return nil, err
if e != nil { }
return nil, err
}
if cfg.Vm.AddrType == config.AddrType_ZXL && txSimContext.GetBlockVersion() >= 2300 && if cfg.Vm.AddrType == config.AddrType_ZXL && txSimContext.GetBlockVersion() >= 2300 &&
utils.CheckZxlAddrFormat(name) { utils.CheckZxlAddrFormat(name) {
contract, err = r.GetContractInfo(txSimContext, name[2:]) name = name[2:]
} }
if err != nil || len(contract.Name) == 0 { contract, err := r.GetContractInfo(txSimContext, name)
return nil, err if err != nil {
} return nil, err
} }
// RuntimeType_GO is not exposed in v230 // RuntimeType_GO is not exposed in v230
if contract.RuntimeType == commonPb.RuntimeType_GO { if contract.RuntimeType == commonPb.RuntimeType_GO {
contract.RuntimeType = commonPb.RuntimeType_DOCKER_GO contract.RuntimeType = commonPb.RuntimeType_DOCKER_GO
......
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