Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
cced1c38
Commit
cced1c38
authored
Jan 16, 2020
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
0409f6d5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
10 deletions
+7
-10
action.go
plugin/dapp/paracross/executor/action.go
+1
-1
paracross_test.go
plugin/dapp/paracross/executor/paracross_test.go
+4
-5
superaccount.go
plugin/dapp/paracross/executor/superaccount.go
+2
-2
paracross.go
plugin/dapp/paracross/types/paracross.go
+0
-2
No files found.
plugin/dapp/paracross/executor/action.go
View file @
cced1c38
...
...
@@ -1163,7 +1163,7 @@ func (a *action) isAllowTransfer() error {
}
//2. 非跨链执行器不允许
if
!
types
.
IsParaExecName
(
string
(
a
.
tx
.
Execer
))
{
return
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"exec=%s,should prefix with user.p."
,
string
(
a
.
tx
.
Execer
))
return
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"exec=%s,should prefix with user.p."
,
string
(
a
.
tx
.
Execer
))
}
return
nil
...
...
plugin/dapp/paracross/executor/paracross_test.go
View file @
cced1c38
...
...
@@ -823,12 +823,12 @@ func TestUpdateCommitBlockHashs(t *testing.T) {
}
func
TestValidParaCrossExec
(
t
*
testing
.
T
){
func
TestValidParaCrossExec
(
t
*
testing
.
T
)
{
exec
:=
[]
byte
(
"paracross"
)
valid
:=
types
.
IsParaExecName
(
string
(
exec
))
assert
.
Equal
(
t
,
false
,
valid
)
assert
.
Equal
(
t
,
false
,
valid
)
exec
=
[]
byte
(
"user.p.para.paracross"
)
valid
=
types
.
IsParaExecName
(
string
(
exec
))
assert
.
Equal
(
t
,
true
,
valid
)
}
\ No newline at end of file
assert
.
Equal
(
t
,
true
,
valid
)
}
plugin/dapp/paracross/executor/superaccount.go
View file @
cced1c38
...
...
@@ -991,7 +991,7 @@ func (a *action) NodeGroupConfig(config *pt.ParaNodeGroupConfig) (*types.Receipt
return
nil
,
pt
.
ErrInvalidTitle
}
if
!
types
.
IsParaExecName
(
string
(
a
.
tx
.
Execer
))
&&
cfg
.
IsDappFork
(
a
.
exec
.
GetMainHeight
(),
pt
.
ParaX
,
pt
.
ForkParaAssetTransferRbk
)
{
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"exec=%s,should prefix with user.p."
,
string
(
a
.
tx
.
Execer
))
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"exec=%s,should prefix with user.p."
,
string
(
a
.
tx
.
Execer
))
}
if
config
.
Op
==
pt
.
ParacrossNodeGroupApply
{
...
...
@@ -1032,7 +1032,7 @@ func (a *action) NodeConfig(config *pt.ParaNodeAddrConfig) (*types.Receipt, erro
return
nil
,
pt
.
ErrInvalidTitle
}
if
!
types
.
IsParaExecName
(
string
(
a
.
tx
.
Execer
))
&&
cfg
.
IsDappFork
(
a
.
exec
.
GetMainHeight
(),
pt
.
ParaX
,
pt
.
ForkParaAssetTransferRbk
)
{
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"exec=%s,should prefix with user.p."
,
string
(
a
.
tx
.
Execer
))
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"exec=%s,should prefix with user.p."
,
string
(
a
.
tx
.
Execer
))
}
if
config
.
Op
==
pt
.
ParaOpNewApply
{
...
...
plugin/dapp/paracross/types/paracross.go
View file @
cced1c38
...
...
@@ -331,8 +331,6 @@ func (p ParacrossType) CreateRawTransferTx(action string, param json.RawMessage)
return
tx
,
nil
}
//GetDappForkHeight get paracross dapp fork height
func
GetDappForkHeight
(
cfg
*
types
.
Chain33Config
,
forkKey
string
)
int64
{
var
forkHeight
int64
...
...
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