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
0914efab
Commit
0914efab
authored
Jun 28, 2019
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
5ce7a230
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
action.go
plugin/dapp/paracross/executor/action.go
+4
-5
exec_del_local.go
plugin/dapp/paracross/executor/exec_del_local.go
+2
-2
exec_local.go
plugin/dapp/paracross/executor/exec_local.go
+2
-2
No files found.
plugin/dapp/paracross/executor/action.go
View file @
0914efab
...
@@ -273,7 +273,7 @@ func getDappForkHeight(forkKey string) int64 {
...
@@ -273,7 +273,7 @@ func getDappForkHeight(forkKey string) int64 {
}
else
{
}
else
{
forkHeight
=
types
.
GetDappFork
(
pt
.
ParaX
,
forkKey
)
forkHeight
=
types
.
GetDappFork
(
pt
.
ParaX
,
forkKey
)
if
types
.
IsLocal
(){
if
types
.
IsLocal
()
{
switch
forkKey
{
switch
forkKey
{
case
pt
.
ForkCommitTx
:
case
pt
.
ForkCommitTx
:
forkHeight
=
10
forkHeight
=
10
...
@@ -498,12 +498,11 @@ func (a *action) commitTxDone(nodeStatus *pt.ParacrossNodeStatus, stat *pt.Parac
...
@@ -498,12 +498,11 @@ func (a *action) commitTxDone(nodeStatus *pt.ParacrossNodeStatus, stat *pt.Parac
saveTitleHeight
(
a
.
db
,
calcTitleHeightKey
(
stat
.
Title
,
stat
.
Height
),
stat
)
saveTitleHeight
(
a
.
db
,
calcTitleHeightKey
(
stat
.
Title
,
stat
.
Height
),
stat
)
//之前记录的stat 状态没更新
//之前记录的stat 状态没更新
if
stat
.
MainHeight
>=
getDappForkHeight
(
pt
.
ForkLoopCheckCommitTxDone
){
if
stat
.
MainHeight
>=
getDappForkHeight
(
pt
.
ForkLoopCheckCommitTxDone
)
{
r
:=
makeCommitStatReceipt
(
stat
)
r
:=
makeCommitStatReceipt
(
stat
)
receipt
=
mergeReceipt
(
receipt
,
r
)
receipt
=
mergeReceipt
(
receipt
,
r
)
}
}
//add commit done receipt
//add commit done receipt
receiptDone
:=
makeDoneReceipt
(
a
.
exec
.
GetMainHeight
(),
nodeStatus
,
int32
(
most
),
int32
(
commitCount
),
int32
(
len
(
nodes
)))
receiptDone
:=
makeDoneReceipt
(
a
.
exec
.
GetMainHeight
(),
nodeStatus
,
int32
(
most
),
int32
(
commitCount
),
int32
(
len
(
nodes
)))
receipt
=
mergeReceipt
(
receipt
,
receiptDone
)
receipt
=
mergeReceipt
(
receipt
,
receiptDone
)
...
@@ -555,7 +554,7 @@ func (a *action) procCrossTxs(status *pt.ParacrossNodeStatus) (*types.Receipt, e
...
@@ -555,7 +554,7 @@ func (a *action) procCrossTxs(status *pt.ParacrossNodeStatus) (*types.Receipt, e
}
}
if
enableParacrossTransfer
&&
status
.
Height
>
0
&&
haveCrossTxs
{
if
enableParacrossTransfer
&&
status
.
Height
>
0
&&
haveCrossTxs
{
clog
.
Info
(
"paracross.Commit commitDone do cross"
,
"height"
,
status
.
Height
,
"havecross"
,
haveCrossTxs
)
clog
.
Info
(
"paracross.Commit commitDone do cross"
,
"height"
,
status
.
Height
,
"havecross"
,
haveCrossTxs
)
crossTxReceipt
,
err
:=
a
.
execCrossTxs
(
status
)
crossTxReceipt
,
err
:=
a
.
execCrossTxs
(
status
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
@@ -639,7 +638,7 @@ func (a *action) checkCommitTxDone(title string, stat *pt.ParacrossHeightStatus,
...
@@ -639,7 +638,7 @@ func (a *action) checkCommitTxDone(title string, stat *pt.ParacrossHeightStatus,
//只根据stat的信息在commitDone之后重构一个commitStatus做后续处理
//只根据stat的信息在commitDone之后重构一个commitStatus做后续处理
func
(
a
*
action
)
commitTxDoneByStat
(
stat
*
pt
.
ParacrossHeightStatus
,
titleStatus
*
pt
.
ParacrossStatus
,
func
(
a
*
action
)
commitTxDoneByStat
(
stat
*
pt
.
ParacrossHeightStatus
,
titleStatus
*
pt
.
ParacrossStatus
,
nodes
map
[
string
]
struct
{},
receipt
*
types
.
Receipt
)
(
*
types
.
Receipt
,
error
)
{
nodes
map
[
string
]
struct
{},
receipt
*
types
.
Receipt
)
(
*
types
.
Receipt
,
error
)
{
clog
.
Info
(
"paracross.commitTxDoneByStat"
,
"stat.title"
,
stat
.
Title
,
"stat.height"
,
stat
.
Height
,
"notes"
,
len
(
nodes
))
clog
.
Info
(
"paracross.commitTxDoneByStat"
,
"stat.title"
,
stat
.
Title
,
"stat.height"
,
stat
.
Height
,
"notes"
,
len
(
nodes
))
for
i
,
v
:=
range
stat
.
Details
.
Addrs
{
for
i
,
v
:=
range
stat
.
Details
.
Addrs
{
...
...
plugin/dapp/paracross/executor/exec_del_local.go
View file @
0914efab
...
@@ -32,7 +32,7 @@ func (e *Paracross) ExecDelLocal_Commit(payload *pt.ParacrossCommitAction, tx *t
...
@@ -32,7 +32,7 @@ func (e *Paracross) ExecDelLocal_Commit(payload *pt.ParacrossCommitAction, tx *t
key
=
calcLocalHeightKey
(
g
.
Title
,
g
.
Height
)
key
=
calcLocalHeightKey
(
g
.
Title
,
g
.
Height
)
set
.
KV
=
append
(
set
.
KV
,
&
types
.
KeyValue
{
Key
:
key
,
Value
:
nil
})
set
.
KV
=
append
(
set
.
KV
,
&
types
.
KeyValue
{
Key
:
key
,
Value
:
nil
})
if
!
types
.
IsPara
()
&&
g
.
Height
>
0
{
if
!
types
.
IsPara
()
&&
g
.
Height
>
0
{
r
,
err
:=
e
.
saveLocalParaTxs
(
tx
,
true
)
r
,
err
:=
e
.
saveLocalParaTxs
(
tx
,
true
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
@@ -88,7 +88,7 @@ func (e *Paracross) ExecDelLocal_NodeConfig(payload *pt.ParaNodeAddrConfig, tx *
...
@@ -88,7 +88,7 @@ func (e *Paracross) ExecDelLocal_NodeConfig(payload *pt.ParaNodeAddrConfig, tx *
key
=
calcLocalHeightKey
(
g
.
Title
,
g
.
Height
)
key
=
calcLocalHeightKey
(
g
.
Title
,
g
.
Height
)
set
.
KV
=
append
(
set
.
KV
,
&
types
.
KeyValue
{
Key
:
key
,
Value
:
nil
})
set
.
KV
=
append
(
set
.
KV
,
&
types
.
KeyValue
{
Key
:
key
,
Value
:
nil
})
if
!
types
.
IsPara
()
&&
g
.
Height
>
0
{
if
!
types
.
IsPara
()
&&
g
.
Height
>
0
{
r
,
err
:=
e
.
saveLocalParaTxsFork
(
&
g
,
true
)
r
,
err
:=
e
.
saveLocalParaTxsFork
(
&
g
,
true
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
...
plugin/dapp/paracross/executor/exec_local.go
View file @
0914efab
...
@@ -35,7 +35,7 @@ func (e *Paracross) ExecLocal_Commit(payload *pt.ParacrossCommitAction, tx *type
...
@@ -35,7 +35,7 @@ func (e *Paracross) ExecLocal_Commit(payload *pt.ParacrossCommitAction, tx *type
key
=
calcLocalHeightKey
(
g
.
Title
,
g
.
Height
)
key
=
calcLocalHeightKey
(
g
.
Title
,
g
.
Height
)
set
.
KV
=
append
(
set
.
KV
,
&
types
.
KeyValue
{
Key
:
key
,
Value
:
types
.
Encode
(
&
g
)})
set
.
KV
=
append
(
set
.
KV
,
&
types
.
KeyValue
{
Key
:
key
,
Value
:
types
.
Encode
(
&
g
)})
if
!
types
.
IsPara
()
&&
g
.
Height
>
0
{
if
!
types
.
IsPara
()
&&
g
.
Height
>
0
{
r
,
err
:=
e
.
saveLocalParaTxs
(
tx
,
false
)
r
,
err
:=
e
.
saveLocalParaTxs
(
tx
,
false
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
@@ -90,7 +90,7 @@ func (e *Paracross) ExecLocal_NodeConfig(payload *pt.ParaNodeAddrConfig, tx *typ
...
@@ -90,7 +90,7 @@ func (e *Paracross) ExecLocal_NodeConfig(payload *pt.ParaNodeAddrConfig, tx *typ
key
=
calcLocalHeightKey
(
g
.
Title
,
g
.
Height
)
key
=
calcLocalHeightKey
(
g
.
Title
,
g
.
Height
)
set
.
KV
=
append
(
set
.
KV
,
&
types
.
KeyValue
{
Key
:
key
,
Value
:
types
.
Encode
(
&
g
)})
set
.
KV
=
append
(
set
.
KV
,
&
types
.
KeyValue
{
Key
:
key
,
Value
:
types
.
Encode
(
&
g
)})
if
!
types
.
IsPara
()
&&
g
.
Height
>
0
{
if
!
types
.
IsPara
()
&&
g
.
Height
>
0
{
r
,
err
:=
e
.
saveLocalParaTxsFork
(
&
g
,
false
)
r
,
err
:=
e
.
saveLocalParaTxsFork
(
&
g
,
false
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
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