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
df09995f
Commit
df09995f
authored
May 23, 2019
by
mdj33
Committed by
vipwzw
May 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
take cross tx in exec directly
parent
07ffb1d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
13 deletions
+4
-13
para.go
plugin/consensus/para/para.go
+0
-9
exec_local.go
plugin/dapp/paracross/executor/exec_local.go
+4
-4
No files found.
plugin/consensus/para/para.go
View file @
df09995f
...
@@ -679,15 +679,6 @@ func (client *client) addMinerTx(preStateHash []byte, block *types.Block, main *
...
@@ -679,15 +679,6 @@ func (client *client) addMinerTx(preStateHash []byte, block *types.Block, main *
MainBlockHeight
:
main
.
Detail
.
Block
.
Height
,
MainBlockHeight
:
main
.
Detail
.
Block
.
Height
,
}
}
//获取当前区块的所有原始tx hash 和跨链hash作为bitmap base hashs,因为有可能在执行过程中有些tx 执行error被剔除掉
if
main
.
Detail
.
Block
.
Height
>=
mainForkParacrossCommitTx
{
for
_
,
tx
:=
range
txs
{
status
.
TxHashs
=
append
(
status
.
TxHashs
,
tx
.
Hash
())
}
txHashs
:=
paraexec
.
FilterParaCrossTxHashes
(
types
.
GetTitle
(),
txs
)
status
.
CrossTxHashs
=
append
(
status
.
CrossTxHashs
,
txHashs
...
)
}
tx
,
err
:=
pt
.
CreateRawMinerTx
(
&
pt
.
ParacrossMinerAction
{
tx
,
err
:=
pt
.
CreateRawMinerTx
(
&
pt
.
ParacrossMinerAction
{
Status
:
status
,
Status
:
status
,
IsSelfConsensus
:
isParaSelfConsensusForked
(
status
.
MainBlockHeight
),
IsSelfConsensus
:
isParaSelfConsensusForked
(
status
.
MainBlockHeight
),
...
...
plugin/dapp/paracross/executor/exec_local.go
View file @
df09995f
...
@@ -170,16 +170,16 @@ func setMinerTxResultFork(payload *pt.ParacrossMinerAction, txs []*types.Transac
...
@@ -170,16 +170,16 @@ func setMinerTxResultFork(payload *pt.ParacrossMinerAction, txs []*types.Transac
hash
:=
tx
.
Hash
()
hash
:=
tx
.
Hash
()
curTxHashs
=
append
(
curTxHashs
,
hash
)
curTxHashs
=
append
(
curTxHashs
,
hash
)
}
}
baseTxHashs
:=
payload
.
Status
.
TxHashs
baseCrossTxHashs
:=
payload
.
Status
.
CrossTxHashs
baseCrossTxHashs
:=
FilterParaCrossTxHashes
(
types
.
GetTitle
(),
txs
)
//主链自己过滤平行链tx, 对平行链执行失败的tx主链无法识别,主链和平行链需要获取相同的最初的tx map
//主链自己过滤平行链tx, 对平行链执行失败的tx主链无法识别,主链和平行链需要获取相同的最初的tx map
//全部平行链tx结果
//全部平行链tx结果
payload
.
Status
.
TxResult
=
util
.
CalcBitMap
(
base
TxHashs
,
curTxHashs
,
receipts
)
payload
.
Status
.
TxResult
=
util
.
CalcBitMap
(
cur
TxHashs
,
curTxHashs
,
receipts
)
//跨链tx结果
//跨链tx结果
payload
.
Status
.
CrossTxResult
=
util
.
CalcBitMap
(
baseCrossTxHashs
,
curTxHashs
,
receipts
)
payload
.
Status
.
CrossTxResult
=
util
.
CalcBitMap
(
baseCrossTxHashs
,
curTxHashs
,
receipts
)
payload
.
Status
.
TxHashs
=
[][]
byte
{
CalcTxHashsHash
(
base
TxHashs
)}
payload
.
Status
.
TxHashs
=
[][]
byte
{
CalcTxHashsHash
(
cur
TxHashs
)}
payload
.
Status
.
CrossTxHashs
=
[][]
byte
{
CalcTxHashsHash
(
baseCrossTxHashs
)}
payload
.
Status
.
CrossTxHashs
=
[][]
byte
{
CalcTxHashsHash
(
baseCrossTxHashs
)}
}
}
...
...
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