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
c169bc80
Commit
c169bc80
authored
Jul 26, 2019
by
mdj33
Committed by
vipwzw
Aug 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
veify notify asap
parent
e925de1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
paracreate.go
plugin/consensus/para/paracreate.go
+9
-4
No files found.
plugin/consensus/para/paracreate.go
View file @
c169bc80
...
@@ -35,10 +35,6 @@ func (client *client) addLocalBlock(height int64, block *pt.ParaLocalDbBlock) er
...
@@ -35,10 +35,6 @@ func (client *client) addLocalBlock(height int64, block *pt.ParaLocalDbBlock) er
}
}
func
(
client
*
client
)
checkCommitTxSuccess
(
txs
[]
*
pt
.
TxDetail
)
{
func
(
client
*
client
)
checkCommitTxSuccess
(
txs
[]
*
pt
.
TxDetail
)
{
if
atomic
.
LoadInt32
(
&
client
.
isCaughtUp
)
!=
1
{
return
}
curTx
:=
client
.
commitMsgClient
.
getCurrentTx
()
curTx
:=
client
.
commitMsgClient
.
getCurrentTx
()
if
curTx
==
nil
{
if
curTx
==
nil
{
return
return
...
@@ -52,6 +48,10 @@ func (client *client) checkCommitTxSuccess(txs []*pt.TxDetail) {
...
@@ -52,6 +48,10 @@ func (client *client) checkCommitTxSuccess(txs []*pt.TxDetail) {
}
}
}
}
}
else
{
}
else
{
//如果正在追赶,则暂时不去主链查找,减少耗时
if
atomic
.
LoadInt32
(
&
client
.
isCaughtUp
)
!=
1
{
return
}
//去主链查询
//去主链查询
receipt
,
_
:=
client
.
QueryTxOnMainByHash
(
curTx
.
Hash
())
receipt
,
_
:=
client
.
QueryTxOnMainByHash
(
curTx
.
Hash
())
if
receipt
!=
nil
&&
receipt
.
Receipt
.
Ty
==
types
.
ExecOk
{
if
receipt
!=
nil
&&
receipt
.
Receipt
.
Ty
==
types
.
ExecOk
{
...
@@ -59,6 +59,11 @@ func (client *client) checkCommitTxSuccess(txs []*pt.TxDetail) {
...
@@ -59,6 +59,11 @@ func (client *client) checkCommitTxSuccess(txs []*pt.TxDetail) {
}
}
}
}
//如果没找到且当前正在追赶,则不计数,如果找到了,即便当前在追赶,也通知
if
!
txMap
[
string
(
curTx
.
Hash
())]
&&
atomic
.
LoadInt32
(
&
client
.
isCaughtUp
)
!=
1
{
return
}
client
.
commitMsgClient
.
verifyNotify
(
txMap
[
string
(
curTx
.
Hash
())])
client
.
commitMsgClient
.
verifyNotify
(
txMap
[
string
(
curTx
.
Hash
())])
}
}
...
...
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