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
d4490be4
Commit
d4490be4
authored
Sep 14, 2021
by
mdj33
Committed by
vipwzw
Sep 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add para chain no cross asset height list to earlier fork height
parent
eb4c79bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
13 deletions
+35
-13
action.go
plugin/dapp/paracross/executor/action.go
+35
-13
No files found.
plugin/dapp/paracross/executor/action.go
View file @
d4490be4
...
@@ -1021,6 +1021,24 @@ func isInNoHeightCrossAsseList(list string, status *pt.ParacrossNodeStatus) (boo
...
@@ -1021,6 +1021,24 @@ func isInNoHeightCrossAsseList(list string, status *pt.ParacrossNodeStatus) (boo
return
false
,
nil
return
false
,
nil
}
}
func
checkIsInIgnoreHeightList
(
api
client
.
QueueProtocolAPI
,
status
*
pt
.
ParacrossNodeStatus
)
(
bool
,
error
)
{
conf
:=
types
.
ConfSub
(
api
.
GetConfig
(),
pt
.
ParaX
)
heightListStr
:=
conf
.
GStr
(
"paraNoCrossAssetHeightList"
)
if
len
(
heightListStr
)
>
0
{
in
,
err
:=
isInNoHeightCrossAsseList
(
heightListStr
,
status
)
if
err
!=
nil
{
clog
.
Error
(
"getCrossTxHashs decode NoHeightCrossAsseList"
,
"err"
,
err
)
return
false
,
err
}
//在配置的无资产跨链高度列表中,则直接退出
if
in
{
clog
.
Debug
(
"getCrossTxHashs NoHeightCrossAsseList"
,
"str"
,
heightListStr
,
"height"
,
status
.
Height
,
"title"
,
status
.
Title
)
return
true
,
nil
}
}
return
false
,
nil
}
func
getCrossTxHashsByRst
(
api
client
.
QueueProtocolAPI
,
status
*
pt
.
ParacrossNodeStatus
)
([][]
byte
,
[]
byte
,
error
)
{
func
getCrossTxHashsByRst
(
api
client
.
QueueProtocolAPI
,
status
*
pt
.
ParacrossNodeStatus
)
([][]
byte
,
[]
byte
,
error
)
{
//支持带版本号的跨链交易bitmap
//支持带版本号的跨链交易bitmap
//1.如果等于0,是老版本的平行链,按老的方式处理. 2. 如果大于0等于ver,新版本且没有跨链交易,不需要处理. 3. 大于ver,说明有跨链交易按老的方式处理
//1.如果等于0,是老版本的平行链,按老的方式处理. 2. 如果大于0等于ver,新版本且没有跨链交易,不需要处理. 3. 大于ver,说明有跨链交易按老的方式处理
...
@@ -1040,19 +1058,14 @@ func getCrossTxHashsByRst(api client.QueueProtocolAPI, status *pt.ParacrossNodeS
...
@@ -1040,19 +1058,14 @@ func getCrossTxHashsByRst(api client.QueueProtocolAPI, status *pt.ParacrossNodeS
return
nil
,
nil
,
nil
return
nil
,
nil
,
nil
}
}
}
}
conf
:=
types
.
ConfSub
(
cfg
,
pt
.
ParaX
)
heightListStr
:=
conf
.
GStr
(
"paraNoCrossAssetHeightList"
)
//此平行链高度在忽略检查跨链交易列表中,则直接退出
if
len
(
heightListStr
)
>
0
{
ignore
,
err
:=
checkIsInIgnoreHeightList
(
api
,
status
)
in
,
err
:=
isInNoHeightCrossAsseList
(
heightListStr
,
status
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
nil
,
err
clog
.
Error
(
"getCrossTxHashs decode NoHeightCrossAsseList"
,
"err"
,
err
)
}
return
nil
,
nil
,
err
if
ignore
{
}
return
nil
,
nil
,
nil
//在配置的无资产跨链高度列表中,则直接退出
if
in
{
clog
.
Debug
(
"getCrossTxHashs NoHeightCrossAsseList"
,
"str"
,
heightListStr
,
"height"
,
status
.
Height
,
"title"
,
status
.
Title
)
return
nil
,
nil
,
nil
}
}
}
blockDetail
,
err
:=
GetBlock
(
api
,
status
.
MainBlockHash
)
blockDetail
,
err
:=
GetBlock
(
api
,
status
.
MainBlockHash
)
...
@@ -1087,6 +1100,15 @@ func getCrossTxHashs(api client.QueueProtocolAPI, status *pt.ParacrossNodeStatus
...
@@ -1087,6 +1100,15 @@ func getCrossTxHashs(api client.QueueProtocolAPI, status *pt.ParacrossNodeStatus
return
nil
,
nil
,
types
.
ErrCheckTxHash
return
nil
,
nil
,
types
.
ErrCheckTxHash
}
}
//此平行链高度在忽略检查跨链交易列表中,则直接退出
ignore
,
err
:=
checkIsInIgnoreHeightList
(
api
,
status
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
if
ignore
{
return
nil
,
nil
,
nil
}
blockDetail
,
err
:=
GetBlock
(
api
,
status
.
MainBlockHash
)
blockDetail
,
err
:=
GetBlock
(
api
,
status
.
MainBlockHash
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
nil
,
err
return
nil
,
nil
,
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