aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader/modes.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-27 20:18:26 +0800
committerGitHub <noreply@github.com>2017-02-27 20:18:26 +0800
commite8b3e226124d2b0234c36ef2ca9221dc95c56a1a (patch)
treedc2d820a1e5807e1ecb0912ca1fa10c6d10502f0 /eth/downloader/modes.go
parent32ee1b3cd8ab120fc1ca0bdf2ddccbe6b6bcde83 (diff)
parent8676aeb798f575024e173ca5c677aaee32e77725 (diff)
downloadgo-tangerine-e8b3e226124d2b0234c36ef2ca9221dc95c56a1a.tar
go-tangerine-e8b3e226124d2b0234c36ef2ca9221dc95c56a1a.tar.gz
go-tangerine-e8b3e226124d2b0234c36ef2ca9221dc95c56a1a.tar.bz2
go-tangerine-e8b3e226124d2b0234c36ef2ca9221dc95c56a1a.tar.lz
go-tangerine-e8b3e226124d2b0234c36ef2ca9221dc95c56a1a.tar.xz
go-tangerine-e8b3e226124d2b0234c36ef2ca9221dc95c56a1a.tar.zst
go-tangerine-e8b3e226124d2b0234c36ef2ca9221dc95c56a1a.zip
Merge pull request #3711 from karalabe/update-downloader-logs
eth/downloader: port over old logs from glog to log15
Diffstat (limited to 'eth/downloader/modes.go')
-rw-r--r--eth/downloader/modes.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/eth/downloader/modes.go b/eth/downloader/modes.go
index ec339c074..ae3c43888 100644
--- a/eth/downloader/modes.go
+++ b/eth/downloader/modes.go
@@ -24,3 +24,17 @@ const (
FastSync // Quickly download the headers, full sync only at the chain head
LightSync // Download only the headers and terminate afterwards
)
+
+// String implements the stringer interface.
+func (mode SyncMode) String() string {
+ switch mode {
+ case FullSync:
+ return "full"
+ case FastSync:
+ return "fast"
+ case LightSync:
+ return "light"
+ default:
+ return "unknown"
+ }
+}