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
71099b46
Commit
71099b46
authored
Dec 07, 2018
by
mdj33
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change to function IsMyParaExecName
parent
cda4cffd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
para.go
plugin/consensus/para/para.go
+2
-2
exec_local.go
plugin/dapp/paracross/executor/exec_local.go
+2
-2
paracross.go
plugin/dapp/paracross/executor/paracross.go
+1
-1
No files found.
plugin/consensus/para/para.go
View file @
71099b46
...
@@ -251,7 +251,7 @@ func calcParaCrossTxGroup(tx *types.Transaction, main *types.BlockDetail, index
...
@@ -251,7 +251,7 @@ func calcParaCrossTxGroup(tx *types.Transaction, main *types.BlockDetail, index
endIdx
:=
headIdx
+
int
(
tx
.
GroupCount
)
endIdx
:=
headIdx
+
int
(
tx
.
GroupCount
)
for
i
:=
headIdx
;
i
<
endIdx
;
i
++
{
for
i
:=
headIdx
;
i
<
endIdx
;
i
++
{
if
types
.
Is
ParaTitleTx
(
string
(
main
.
Block
.
Txs
[
i
]
.
Execer
))
{
if
types
.
Is
MyParaExecName
(
string
(
main
.
Block
.
Txs
[
i
]
.
Execer
))
{
continue
continue
}
}
if
main
.
Receipts
[
i
]
.
Ty
==
types
.
ExecOk
{
if
main
.
Receipts
[
i
]
.
Ty
==
types
.
ExecOk
{
...
@@ -272,7 +272,7 @@ func (client *client) FilterTxsForPara(main *types.BlockDetail) []*types.Transac
...
@@ -272,7 +272,7 @@ func (client *client) FilterTxsForPara(main *types.BlockDetail) []*types.Transac
var
txs
[]
*
types
.
Transaction
var
txs
[]
*
types
.
Transaction
for
i
:=
0
;
i
<
len
(
main
.
Block
.
Txs
);
i
++
{
for
i
:=
0
;
i
<
len
(
main
.
Block
.
Txs
);
i
++
{
tx
:=
main
.
Block
.
Txs
[
i
]
tx
:=
main
.
Block
.
Txs
[
i
]
if
types
.
Is
ParaTitleTx
(
string
(
tx
.
Execer
))
{
if
types
.
Is
MyParaExecName
(
string
(
tx
.
Execer
))
{
if
tx
.
GroupCount
>=
paraCrossTxCount
{
if
tx
.
GroupCount
>=
paraCrossTxCount
{
mainTxs
,
endIdx
:=
calcParaCrossTxGroup
(
tx
,
main
,
i
)
mainTxs
,
endIdx
:=
calcParaCrossTxGroup
(
tx
,
main
,
i
)
txs
=
append
(
txs
,
mainTxs
...
)
txs
=
append
(
txs
,
mainTxs
...
)
...
...
plugin/dapp/paracross/executor/exec_local.go
View file @
71099b46
...
@@ -86,7 +86,7 @@ func (e *Paracross) ExecLocal_Miner(payload *pt.ParacrossMinerAction, tx *types.
...
@@ -86,7 +86,7 @@ func (e *Paracross) ExecLocal_Miner(payload *pt.ParacrossMinerAction, tx *types.
hash
:=
tx
.
Hash
()
hash
:=
tx
.
Hash
()
mixTxHashs
=
append
(
mixTxHashs
,
hash
)
mixTxHashs
=
append
(
mixTxHashs
,
hash
)
//跨链交易包含了主链交易,需要过滤出来
//跨链交易包含了主链交易,需要过滤出来
if
types
.
Is
ParaTitleTx
(
string
(
tx
.
Execer
))
{
if
types
.
Is
MyParaExecName
(
string
(
tx
.
Execer
))
{
paraTxHashs
=
append
(
paraTxHashs
,
hash
)
paraTxHashs
=
append
(
paraTxHashs
,
hash
)
}
}
}
}
...
@@ -100,7 +100,7 @@ func (e *Paracross) ExecLocal_Miner(payload *pt.ParacrossMinerAction, tx *types.
...
@@ -100,7 +100,7 @@ func (e *Paracross) ExecLocal_Miner(payload *pt.ParacrossMinerAction, tx *types.
i
=
int
(
end
)
-
1
i
=
int
(
end
)
-
1
continue
continue
}
}
if
types
.
Is
ParaTitleTx
(
string
(
tx
.
Execer
))
&&
if
types
.
Is
MyParaExecName
(
string
(
tx
.
Execer
))
&&
bytes
.
HasSuffix
(
tx
.
Execer
,
[]
byte
(
pt
.
ParaX
))
{
bytes
.
HasSuffix
(
tx
.
Execer
,
[]
byte
(
pt
.
ParaX
))
{
crossTxHashs
=
append
(
crossTxHashs
,
tx
.
Hash
())
crossTxHashs
=
append
(
crossTxHashs
,
tx
.
Hash
())
}
}
...
...
plugin/dapp/paracross/executor/paracross.go
View file @
71099b46
...
@@ -87,7 +87,7 @@ func crossTxGroupProc(txs []*types.Transaction, index int) ([]*types.Transaction
...
@@ -87,7 +87,7 @@ func crossTxGroupProc(txs []*types.Transaction, index int) ([]*types.Transaction
//cross asset transfer in tx group
//cross asset transfer in tx group
var
transfers
[]
*
types
.
Transaction
var
transfers
[]
*
types
.
Transaction
for
i
:=
headIdx
;
i
<
endIdx
;
i
++
{
for
i
:=
headIdx
;
i
<
endIdx
;
i
++
{
if
types
.
Is
ParaTitleTx
(
string
(
txs
[
i
]
.
Execer
))
&&
if
types
.
Is
MyParaExecName
(
string
(
txs
[
i
]
.
Execer
))
&&
bytes
.
HasSuffix
(
txs
[
i
]
.
Execer
,
[]
byte
(
pt
.
ParaX
))
{
bytes
.
HasSuffix
(
txs
[
i
]
.
Execer
,
[]
byte
(
pt
.
ParaX
))
{
transfers
=
append
(
transfers
,
txs
[
i
])
transfers
=
append
(
transfers
,
txs
[
i
])
...
...
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