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
1b69df3c
Commit
1b69df3c
authored
Apr 29, 2019
by
kingwang
Committed by
vipwzw
Apr 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all transaction can be send
parent
ced3ff40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
base.go
plugin/mempool/para/base.go
+11
-14
No files found.
plugin/mempool/para/base.go
View file @
1b69df3c
package
para
package
para
import
(
import
(
"bytes"
"context"
"context"
"sync/atomic"
"sync/atomic"
"time"
"time"
...
@@ -52,19 +51,17 @@ func (mem *Mempool) SetQueueClient(client queue.Client) {
...
@@ -52,19 +51,17 @@ func (mem *Mempool) SetQueueClient(client queue.Client) {
switch
msg
.
Ty
{
switch
msg
.
Ty
{
case
types
.
EventTx
:
case
types
.
EventTx
:
mlog
.
Info
(
"Receive msg from para mempool"
)
mlog
.
Info
(
"Receive msg from para mempool"
)
if
bytes
.
HasPrefix
(
msg
.
GetData
()
.
(
*
types
.
Transaction
)
.
Execer
,
types
.
ParaKey
)
{
tx
:=
msg
.
GetData
()
.
(
*
types
.
Transaction
)
tx
:=
msg
.
GetData
()
.
(
*
types
.
Transaction
)
for
i
:=
0
;
i
<
retry_times
;
i
++
{
for
i
:=
0
;
i
<
retry_times
;
i
++
{
reply
,
err
:=
mem
.
mainGrpcCli
.
SendTransaction
(
context
.
Background
(),
tx
)
reply
,
err
:=
mem
.
mainGrpcCli
.
SendTransaction
(
context
.
Background
(),
tx
)
if
err
==
nil
{
if
err
==
nil
{
msg
.
Reply
(
client
.
NewMessage
(
mem
.
key
,
types
.
EventReply
,
&
types
.
Reply
{
IsOk
:
true
,
Msg
:
reply
.
GetMsg
()}))
msg
.
Reply
(
client
.
NewMessage
(
mem
.
key
,
types
.
EventReply
,
&
types
.
Reply
{
IsOk
:
true
,
Msg
:
reply
.
GetMsg
()}))
break
break
}
else
if
err
!=
nil
&&
i
!=
retry_times
-
1
{
}
else
if
err
!=
nil
&&
i
!=
retry_times
-
1
{
time
.
Sleep
(
time
.
Millisecond
*
10
)
time
.
Sleep
(
time
.
Millisecond
*
10
)
continue
continue
}
else
{
}
else
{
msg
.
Reply
(
client
.
NewMessage
(
mem
.
key
,
types
.
EventReply
,
err
))
msg
.
Reply
(
client
.
NewMessage
(
mem
.
key
,
types
.
EventReply
,
err
))
}
}
}
}
}
default
:
default
:
...
...
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