Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!
Open sidebar
xiao pei
vm-native
Commits
cc600bdd
Commit
cc600bdd
authored
Sep 27, 2022
by
mosesyzding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:modify getContractInfo, --story=1012324
parent
06706aac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
contractmgr/contract_manager.go
contractmgr/contract_manager.go
+11
-12
No files found.
contractmgr/contract_manager.go
View file @
cc600bdd
...
@@ -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
()])
c
ontract
,
err
:=
r
.
GetContractInfo
(
txSimContext
,
name
)
c
fg
,
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment