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
8a6d07a6
Commit
8a6d07a6
authored
Jun 28, 2019
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
4e3ba138
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
action.go
plugin/dapp/paracross/executor/action.go
+6
-6
paracross.pb.go
plugin/dapp/paracross/types/paracross.pb.go
+0
-0
No files found.
plugin/dapp/paracross/executor/action.go
View file @
8a6d07a6
...
...
@@ -237,7 +237,7 @@ func getMostCommit(stat *pt.ParacrossHeightStatus) (int, string) {
}
//需要在ForkLoopCheckCommitTxDone后使用
func
getMostResults
(
mostHash
[]
byte
,
stat
*
pt
.
ParacrossHeightStatus
)
([]
byte
,[]
byte
,
[]
byte
,
[]
byte
,
[]
byte
)
{
func
getMostResults
(
mostHash
[]
byte
,
stat
*
pt
.
ParacrossHeightStatus
)
([]
byte
,
[]
byte
,
[]
byte
,
[]
byte
,
[]
byte
)
{
for
i
,
hash
:=
range
stat
.
BlockDetails
.
BlockHashs
{
if
bytes
.
Equal
(
mostHash
,
hash
)
{
return
stat
.
BlockDetails
.
StateHashs
[
i
],
stat
.
BlockDetails
.
TxResults
[
i
],
stat
.
BlockDetails
.
TxHashs
[
i
],
stat
.
BlockDetails
.
CrossTxResults
[
i
],
stat
.
BlockDetails
.
CrossTxHashs
[
i
]
...
...
@@ -317,9 +317,9 @@ func (a *action) getNodesGroup(title string) (map[string]struct{}, error) {
}
//相同的BlockHash,只保留一份数据
func
updateCommitBlockHashs
(
stat
*
pt
.
ParacrossHeightStatus
,
commit
*
pt
.
ParacrossNodeStatus
)
{
func
updateCommitBlockHashs
(
stat
*
pt
.
ParacrossHeightStatus
,
commit
*
pt
.
ParacrossNodeStatus
)
{
for
_
,
blockHash
:=
range
stat
.
BlockDetails
.
BlockHashs
{
if
bytes
.
Equal
(
blockHash
,
commit
.
BlockHash
)
{
if
bytes
.
Equal
(
blockHash
,
commit
.
BlockHash
)
{
return
}
}
...
...
@@ -431,7 +431,7 @@ func (a *action) Commit(commit *pt.ParacrossCommitAction) (*types.Receipt, error
stat
.
MainHash
=
commit
.
Status
.
MainBlockHash
}
if
commit
.
Status
.
MainBlockHeight
>=
getDappForkHeight
(
pt
.
ForkLoopCheckCommitTxDone
)
{
updateCommitBlockHashs
(
stat
,
commit
.
Status
)
updateCommitBlockHashs
(
stat
,
commit
.
Status
)
}
receipt
=
makeCommitReceipt
(
a
.
fromaddr
,
commit
,
nil
,
stat
)
...
...
@@ -447,13 +447,13 @@ func (a *action) Commit(commit *pt.ParacrossCommitAction) (*types.Receipt, error
if
found
{
stat
.
Details
.
BlockHash
[
index
]
=
commit
.
Status
.
BlockHash
if
commit
.
Status
.
MainBlockHeight
>=
getDappForkHeight
(
pt
.
ForkLoopCheckCommitTxDone
)
{
updateCommitBlockHashs
(
stat
,
commit
.
Status
)
updateCommitBlockHashs
(
stat
,
commit
.
Status
)
}
}
else
{
stat
.
Details
.
Addrs
=
append
(
stat
.
Details
.
Addrs
,
a
.
fromaddr
)
stat
.
Details
.
BlockHash
=
append
(
stat
.
Details
.
BlockHash
,
commit
.
Status
.
BlockHash
)
if
commit
.
Status
.
MainBlockHeight
>=
getDappForkHeight
(
pt
.
ForkLoopCheckCommitTxDone
)
{
updateCommitBlockHashs
(
stat
,
commit
.
Status
)
updateCommitBlockHashs
(
stat
,
commit
.
Status
)
}
}
...
...
plugin/dapp/paracross/types/paracross.pb.go
View file @
8a6d07a6
This diff is collapsed.
Click to expand it.
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