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
6811bb28
Commit
6811bb28
authored
Dec 26, 2018
by
harrylee2015
Committed by
vipwzw
Jan 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ajust name for isCaughtUp
parent
d93b32d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
para.go
plugin/consensus/para/para.go
+6
-6
paracommitmsg.go
plugin/consensus/para/paracommitmsg.go
+1
-1
No files found.
plugin/consensus/para/para.go
View file @
6811bb28
...
...
@@ -60,7 +60,7 @@ type client struct {
conn
*
grpc
.
ClientConn
grpcClient
types
.
Chain33Client
paraClient
paracross
.
ParacrossClient
isCaught
u
p
bool
isCaught
U
p
bool
commitMsgClient
*
commitMsgClient
authAccount
string
privateKey
crypto
.
PrivKey
...
...
@@ -119,7 +119,7 @@ func New(cfg *types.Consensus, sub []byte) queue.Module {
paraClient
:
paraCli
,
authAccount
:
cfg
.
AuthAccount
,
privateKey
:
priKey
,
isCaught
u
p
:
false
,
isCaught
U
p
:
false
,
}
if
cfg
.
WaitBlocks4CommitMsg
<
2
{
...
...
@@ -445,9 +445,9 @@ func (client *client) RequestTx(currSeq int64, preMainBlockHash []byte) ([]*type
plog
.
Info
(
"GetCurrentSeq"
,
"Len of txs"
,
len
(
txs
),
"seqTy"
,
seqTy
)
if
lastSeq
-
currSeq
>
emptyBlockInterval
{
client
.
isCaught
u
p
=
false
client
.
isCaught
U
p
=
false
}
else
{
client
.
isCaught
u
p
=
true
client
.
isCaught
U
p
=
true
}
if
client
.
authAccount
!=
""
{
...
...
@@ -655,7 +655,7 @@ func (client *client) CreateBlock() {
plog
.
Error
(
"Incorrect sequence type"
)
incSeqFlag
=
false
}
if
client
.
isCaught
u
p
{
if
client
.
isCaught
U
p
{
time
.
Sleep
(
time
.
Second
*
time
.
Duration
(
blockSec
))
}
}
...
...
@@ -772,7 +772,7 @@ func (client *client) Query_IsCaughtUp(req *types.ReqNil) (types.Message, error)
if
client
==
nil
{
return
nil
,
fmt
.
Errorf
(
"client not bind message queue."
)
}
return
&
types
.
IsCaughtUp
{
Iscaughtup
:
client
.
isCaught
u
p
},
nil
return
&
types
.
IsCaughtUp
{
Iscaughtup
:
client
.
isCaught
U
p
},
nil
}
func
checkMinerTx
(
current
*
types
.
BlockDetail
)
error
{
...
...
plugin/consensus/para/paracommitmsg.go
View file @
6811bb28
...
...
@@ -83,7 +83,7 @@ out:
}
case
block
:=
<-
client
.
mainBlockAdd
:
if
client
.
currentTx
!=
nil
&&
client
.
paraClient
.
isCaught
u
p
{
if
client
.
currentTx
!=
nil
&&
client
.
paraClient
.
isCaught
U
p
{
exist
:=
checkTxInMainBlock
(
client
.
currentTx
,
block
)
if
exist
{
finishHeight
=
sendingHeight
...
...
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