Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
张蕾
Geth-Modification
Commits
8676aeb7
Unverified
Commit
8676aeb7
authored
Feb 27, 2017
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth/downloader: review fixes
parent
46eea4d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
downloader.go
eth/downloader/downloader.go
+1
-1
modes.go
eth/downloader/modes.go
+12
-6
No files found.
eth/downloader/downloader.go
View file @
8676aeb7
...
@@ -383,7 +383,7 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e
...
@@ -383,7 +383,7 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e
return
errTooOld
return
errTooOld
}
}
log
.
Debug
(
"Synchronising with the network"
,
"peer"
,
p
.
id
,
"eth"
,
p
.
version
,
"head"
,
hash
.
Hex
()[
2
:
10
],
"td"
,
td
,
"mode"
,
syncModeLabels
[
d
.
mode
]
)
log
.
Debug
(
"Synchronising with the network"
,
"peer"
,
p
.
id
,
"eth"
,
p
.
version
,
"head"
,
hash
.
Hex
()[
2
:
10
],
"td"
,
td
,
"mode"
,
d
.
mode
)
defer
func
(
start
time
.
Time
)
{
defer
func
(
start
time
.
Time
)
{
log
.
Debug
(
"Synchronisation terminated"
,
"elapsed"
,
time
.
Since
(
start
))
log
.
Debug
(
"Synchronisation terminated"
,
"elapsed"
,
time
.
Since
(
start
))
}(
time
.
Now
())
}(
time
.
Now
())
...
...
eth/downloader/modes.go
View file @
8676aeb7
...
@@ -25,10 +25,16 @@ const (
...
@@ -25,10 +25,16 @@ const (
LightSync
// Download only the headers and terminate afterwards
LightSync
// Download only the headers and terminate afterwards
)
)
// syncModeLabels contains a mapping of sync modes to textual label used by the
// String implements the stringer interface.
// logging system.
func
(
mode
SyncMode
)
String
()
string
{
var
syncModeLabels
=
map
[
SyncMode
]
string
{
switch
mode
{
FullSync
:
"full"
,
case
FullSync
:
FastSync
:
"fast"
,
return
"full"
LightSync
:
"light"
,
case
FastSync
:
return
"fast"
case
LightSync
:
return
"light"
default
:
return
"unknown"
}
}
}
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