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
d93b32d2
Commit
d93b32d2
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
16b9b452
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 @
d93b32d2
...
@@ -60,7 +60,7 @@ type client struct {
...
@@ -60,7 +60,7 @@ type client struct {
conn
*
grpc
.
ClientConn
conn
*
grpc
.
ClientConn
grpcClient
types
.
Chain33Client
grpcClient
types
.
Chain33Client
paraClient
paracross
.
ParacrossClient
paraClient
paracross
.
ParacrossClient
is
c
aughtup
bool
is
C
aughtup
bool
commitMsgClient
*
commitMsgClient
commitMsgClient
*
commitMsgClient
authAccount
string
authAccount
string
privateKey
crypto
.
PrivKey
privateKey
crypto
.
PrivKey
...
@@ -119,7 +119,7 @@ func New(cfg *types.Consensus, sub []byte) queue.Module {
...
@@ -119,7 +119,7 @@ func New(cfg *types.Consensus, sub []byte) queue.Module {
paraClient
:
paraCli
,
paraClient
:
paraCli
,
authAccount
:
cfg
.
AuthAccount
,
authAccount
:
cfg
.
AuthAccount
,
privateKey
:
priKey
,
privateKey
:
priKey
,
is
c
aughtup
:
false
,
is
C
aughtup
:
false
,
}
}
if
cfg
.
WaitBlocks4CommitMsg
<
2
{
if
cfg
.
WaitBlocks4CommitMsg
<
2
{
...
@@ -445,9 +445,9 @@ func (client *client) RequestTx(currSeq int64, preMainBlockHash []byte) ([]*type
...
@@ -445,9 +445,9 @@ func (client *client) RequestTx(currSeq int64, preMainBlockHash []byte) ([]*type
plog
.
Info
(
"GetCurrentSeq"
,
"Len of txs"
,
len
(
txs
),
"seqTy"
,
seqTy
)
plog
.
Info
(
"GetCurrentSeq"
,
"Len of txs"
,
len
(
txs
),
"seqTy"
,
seqTy
)
if
lastSeq
-
currSeq
>
emptyBlockInterval
{
if
lastSeq
-
currSeq
>
emptyBlockInterval
{
client
.
is
c
aughtup
=
false
client
.
is
C
aughtup
=
false
}
else
{
}
else
{
client
.
is
c
aughtup
=
true
client
.
is
C
aughtup
=
true
}
}
if
client
.
authAccount
!=
""
{
if
client
.
authAccount
!=
""
{
...
@@ -655,7 +655,7 @@ func (client *client) CreateBlock() {
...
@@ -655,7 +655,7 @@ func (client *client) CreateBlock() {
plog
.
Error
(
"Incorrect sequence type"
)
plog
.
Error
(
"Incorrect sequence type"
)
incSeqFlag
=
false
incSeqFlag
=
false
}
}
if
client
.
is
c
aughtup
{
if
client
.
is
C
aughtup
{
time
.
Sleep
(
time
.
Second
*
time
.
Duration
(
blockSec
))
time
.
Sleep
(
time
.
Second
*
time
.
Duration
(
blockSec
))
}
}
}
}
...
@@ -772,7 +772,7 @@ func (client *client) Query_IsCaughtUp(req *types.ReqNil) (types.Message, error)
...
@@ -772,7 +772,7 @@ func (client *client) Query_IsCaughtUp(req *types.ReqNil) (types.Message, error)
if
client
==
nil
{
if
client
==
nil
{
return
nil
,
fmt
.
Errorf
(
"client not bind message queue."
)
return
nil
,
fmt
.
Errorf
(
"client not bind message queue."
)
}
}
return
&
types
.
IsCaughtUp
{
Iscaughtup
:
client
.
is
c
aughtup
},
nil
return
&
types
.
IsCaughtUp
{
Iscaughtup
:
client
.
is
C
aughtup
},
nil
}
}
func
checkMinerTx
(
current
*
types
.
BlockDetail
)
error
{
func
checkMinerTx
(
current
*
types
.
BlockDetail
)
error
{
...
...
plugin/consensus/para/paracommitmsg.go
View file @
d93b32d2
...
@@ -83,7 +83,7 @@ out:
...
@@ -83,7 +83,7 @@ out:
}
}
case
block
:=
<-
client
.
mainBlockAdd
:
case
block
:=
<-
client
.
mainBlockAdd
:
if
client
.
currentTx
!=
nil
&&
client
.
paraClient
.
is
c
aughtup
{
if
client
.
currentTx
!=
nil
&&
client
.
paraClient
.
is
C
aughtup
{
exist
:=
checkTxInMainBlock
(
client
.
currentTx
,
block
)
exist
:=
checkTxInMainBlock
(
client
.
currentTx
,
block
)
if
exist
{
if
exist
{
finishHeight
=
sendingHeight
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