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
93acdf5c
Commit
93acdf5c
authored
Jul 24, 2019
by
yukang
Committed by
vipwzw
Aug 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Format code for ci
parent
3061ce77
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
parasync.go
plugin/consensus/para/parasync.go
+1
-1
No files found.
plugin/consensus/para/para.go
View file @
93acdf5c
...
@@ -154,12 +154,12 @@ func New(cfg *types.Consensus, sub []byte) queue.Module {
...
@@ -154,12 +154,12 @@ func New(cfg *types.Consensus, sub []byte) queue.Module {
}
}
para
:=
&
client
{
para
:=
&
client
{
BaseClient
:
c
,
BaseClient
:
c
,
grpcClient
:
grpcCli
,
grpcClient
:
grpcCli
,
authAccount
:
subcfg
.
AuthAccount
,
authAccount
:
subcfg
.
AuthAccount
,
privateKey
:
priKey
,
privateKey
:
priKey
,
subCfg
:
&
subcfg
,
subCfg
:
&
subcfg
,
quitCreate
:
make
(
chan
struct
{}),
quitCreate
:
make
(
chan
struct
{}),
}
}
waitBlocks
:=
int32
(
2
)
//最小是2
waitBlocks
:=
int32
(
2
)
//最小是2
...
...
plugin/consensus/para/parasync.go
View file @
93acdf5c
...
@@ -105,7 +105,7 @@ func (client *client) batchSyncBlocks() {
...
@@ -105,7 +105,7 @@ func (client *client) batchSyncBlocks() {
client
.
setBlockSyncState
(
BlockSyncStateSyncing
)
client
.
setBlockSyncState
(
BlockSyncStateSyncing
)
plog
.
Info
(
"Para sync - syncing"
)
plog
.
Info
(
"Para sync - syncing"
)
errCount
:=
int32
(
0
)
errCount
:=
int32
(
0
)
for
{
for
{
//获取同步状态,在需要同步的情况下执行同步
//获取同步状态,在需要同步的情况下执行同步
curSyncCaughtState
,
err
:=
client
.
syncBlocksIfNeed
()
curSyncCaughtState
,
err
:=
client
.
syncBlocksIfNeed
()
...
...
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