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
dae619a8
Commit
dae619a8
authored
May 24, 2019
by
mdj33
Committed by
vipwzw
May 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
string format to crossResult
parent
7bc33343
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
action.go
plugin/dapp/paracross/executor/action.go
+8
-2
exec_local.go
plugin/dapp/paracross/executor/exec_local.go
+3
-2
No files found.
plugin/dapp/paracross/executor/action.go
View file @
dae619a8
...
@@ -415,7 +415,7 @@ func (a *action) Commit(commit *pt.ParacrossCommitAction) (*types.Receipt, error
...
@@ -415,7 +415,7 @@ func (a *action) Commit(commit *pt.ParacrossCommitAction) (*types.Receipt, error
saveTitle
(
a
.
db
,
calcTitleKey
(
commit
.
Status
.
Title
),
titleStatus
)
saveTitle
(
a
.
db
,
calcTitleKey
(
commit
.
Status
.
Title
),
titleStatus
)
clog
.
Info
(
"paracross.Commit commit done"
,
"height"
,
commit
.
Status
.
Height
,
clog
.
Info
(
"paracross.Commit commit done"
,
"height"
,
commit
.
Status
.
Height
,
"cross tx bitmap"
,
hex
.
EncodeToS
tring
(
commit
.
Status
.
CrossTxResult
),
"statusBlockHash"
,
hex
.
EncodeToString
(
titleStatus
.
BlockHash
))
"cross tx bitmap"
,
s
tring
(
commit
.
Status
.
CrossTxResult
),
"statusBlockHash"
,
hex
.
EncodeToString
(
titleStatus
.
BlockHash
))
//parallel chain not need to process cross commit tx here
//parallel chain not need to process cross commit tx here
if
types
.
IsPara
()
{
if
types
.
IsPara
()
{
...
@@ -491,7 +491,13 @@ func getCrossTxHashs(api client.QueueProtocolAPI, commit *pt.ParacrossCommitActi
...
@@ -491,7 +491,13 @@ func getCrossTxHashs(api client.QueueProtocolAPI, commit *pt.ParacrossCommitActi
//只获取跨链tx
//只获取跨链tx
crossTxHashs
=
paraCrossHashs
crossTxHashs
=
paraCrossHashs
crossTxResult
=
commit
.
Status
.
CrossTxResult
rst
,
err
:=
hex
.
DecodeString
(
string
(
commit
.
Status
.
CrossTxResult
))
if
err
!=
nil
{
clog
.
Error
(
"getCrossTxHashs decode string"
,
"CrossTxResult"
,
string
(
commit
.
Status
.
CrossTxResult
),
"commit.height"
,
commit
.
Status
.
Height
)
return
nil
,
nil
,
types
.
ErrInvalidParam
}
crossTxResult
=
rst
}
}
return
crossTxHashs
,
crossTxResult
,
nil
return
crossTxHashs
,
crossTxResult
,
nil
}
}
...
...
plugin/dapp/paracross/executor/exec_local.go
View file @
dae619a8
...
@@ -11,6 +11,7 @@ import (
...
@@ -11,6 +11,7 @@ import (
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/util"
"github.com/33cn/chain33/util"
pt
"github.com/33cn/plugin/plugin/dapp/paracross/types"
pt
"github.com/33cn/plugin/plugin/dapp/paracross/types"
"encoding/hex"
)
)
//ExecLocal_Commit commit tx local db process
//ExecLocal_Commit commit tx local db process
...
@@ -193,9 +194,9 @@ func setMinerTxResultFork(status *pt.ParacrossNodeStatus, txs []*types.Transacti
...
@@ -193,9 +194,9 @@ func setMinerTxResultFork(status *pt.ParacrossNodeStatus, txs []*types.Transacti
//主链自己过滤平行链tx, 对平行链执行失败的tx主链无法识别,主链和平行链需要获取相同的最初的tx map
//主链自己过滤平行链tx, 对平行链执行失败的tx主链无法识别,主链和平行链需要获取相同的最初的tx map
//全部平行链tx结果
//全部平行链tx结果
status
.
TxResult
=
util
.
CalcBitMap
(
curTxHashs
,
curTxHashs
,
receipts
)
status
.
TxResult
=
[]
byte
(
hex
.
EncodeToString
(
util
.
CalcBitMap
(
curTxHashs
,
curTxHashs
,
receipts
))
)
//跨链tx结果
//跨链tx结果
status
.
CrossTxResult
=
util
.
CalcBitMap
(
crossTxHashs
,
curTxHashs
,
receipts
)
status
.
CrossTxResult
=
[]
byte
(
hex
.
EncodeToString
(
util
.
CalcBitMap
(
crossTxHashs
,
curTxHashs
,
receipts
))
)
status
.
TxHashs
=
[][]
byte
{
CalcTxHashsHash
(
curTxHashs
)}
status
.
TxHashs
=
[][]
byte
{
CalcTxHashsHash
(
curTxHashs
)}
status
.
CrossTxHashs
=
[][]
byte
{
CalcTxHashsHash
(
crossTxHashs
)}
status
.
CrossTxHashs
=
[][]
byte
{
CalcTxHashsHash
(
crossTxHashs
)}
...
...
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