aboutsummaryrefslogtreecommitdiffstats
path: root/les/serverpool.go
diff options
context:
space:
mode:
authorGagziW <leon.stanko@rwth-aachen.de>2018-05-03 16:35:06 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-05-03 16:35:06 +0800
commit7c02933275d8f67fbdf78cdc05c0e09af4ebc657 (patch)
tree0f22379f2b9cb4d2c8731c570409c2b191a1603d /les/serverpool.go
parentf2447bd4c35573d40e2ef678809657c5a1d4e999 (diff)
downloaddexon-7c02933275d8f67fbdf78cdc05c0e09af4ebc657.tar.gz
dexon-7c02933275d8f67fbdf78cdc05c0e09af4ebc657.tar.zst
dexon-7c02933275d8f67fbdf78cdc05c0e09af4ebc657.zip
les: changed if-else blocks to conform with golint (#16658)
Diffstat (limited to 'les/serverpool.go')
-rw-r--r--les/serverpool.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/les/serverpool.go b/les/serverpool.go
index da73b4b3c..a39f88355 100644
--- a/les/serverpool.go
+++ b/les/serverpool.go
@@ -601,9 +601,8 @@ func (e *discoveredEntry) Weight() int64 {
t := time.Duration(mclock.Now() - e.lastDiscovered)
if t <= discoverExpireStart {
return 1000000000
- } else {
- return int64(1000000000 * math.Exp(-float64(t-discoverExpireStart)/float64(discoverExpireConst)))
}
+ return int64(1000000000 * math.Exp(-float64(t-discoverExpireStart)/float64(discoverExpireConst)))
}
// knownEntry implements wrsItem