Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!
Open sidebar
19315872692
vm-native
Commits
36c34920
Commit
36c34920
authored
Apr 19, 2022
by
Devin Zeng
👽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
if block version is v2.2.0_alpha, keep no role&PK in contract.creator
parent
5a856ba9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
contractmgr/contract_manager.go
contractmgr/contract_manager.go
+11
-7
No files found.
contractmgr/contract_manager.go
View file @
36c34920
...
...
@@ -436,13 +436,17 @@ func (r *ContractManagerRuntime) InstallContract(context protocol.TxSimContext,
func
(
r
*
ContractManagerRuntime
)
getCreator
(
context
protocol
.
TxSimContext
)
(
*
accesscontrol
.
MemberFull
,
error
)
{
sender
:=
context
.
GetSender
()
//if context.GetBlockVersion() == 220 { //兼容历史数据的问题
// return &accesscontrol.MemberFull{
// OrgId: sender.GetOrgId(),
// MemberType: sender.GetMemberType(),
// MemberInfo: sender.GetMemberInfo(),
// }, nil
//}
//兼容历史数据的问题
//在220也就是v2.2.0_alpha版中,仍然使用的sender的三个信息
//在后续版本2201也就是v2.2.0 正式版后,都是使用ac模块重新查询完整的MemberFull
//这里使用==220而不是<=220是因为v2.1或者更早的版本在v210文件夹的历史版本合约中
if
context
.
GetBlockVersion
()
==
220
{
return
&
accesscontrol
.
MemberFull
{
OrgId
:
sender
.
GetOrgId
(),
MemberType
:
sender
.
GetMemberType
(),
MemberInfo
:
sender
.
GetMemberInfo
(),
},
nil
}
ac
,
err
:=
context
.
GetAccessControl
()
if
err
!=
nil
{
r
.
log
.
Warn
(
err
)
...
...
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