aboutsummaryrefslogtreecommitdiffstats
path: root/les
diff options
context:
space:
mode:
authorthomasmodeneis <thomas.modeneis@gmail.com>2018-04-18 06:53:50 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-04-18 06:53:50 +0800
commitba1030b6b84f810c04a82221a1b1c0a3dbf499a8 (patch)
tree9c3450535acddfec3b1987e0a2e04fa9ca303e38 /les
parent7605e63cb9dda7fc5bb619abf1eb1f74ac3f6cc1 (diff)
downloadgo-tangerine-ba1030b6b84f810c04a82221a1b1c0a3dbf499a8.tar
go-tangerine-ba1030b6b84f810c04a82221a1b1c0a3dbf499a8.tar.gz
go-tangerine-ba1030b6b84f810c04a82221a1b1c0a3dbf499a8.tar.bz2
go-tangerine-ba1030b6b84f810c04a82221a1b1c0a3dbf499a8.tar.lz
go-tangerine-ba1030b6b84f810c04a82221a1b1c0a3dbf499a8.tar.xz
go-tangerine-ba1030b6b84f810c04a82221a1b1c0a3dbf499a8.tar.zst
go-tangerine-ba1030b6b84f810c04a82221a1b1c0a3dbf499a8.zip
build: enable goimports and varcheck linters (#16446)
Diffstat (limited to 'les')
-rw-r--r--les/bloombits.go10
-rw-r--r--les/serverpool.go4
-rw-r--r--les/sync.go5
3 files changed, 0 insertions, 19 deletions
diff --git a/les/bloombits.go b/les/bloombits.go
index de233d751..2871a9006 100644
--- a/les/bloombits.go
+++ b/les/bloombits.go
@@ -72,13 +72,3 @@ func (eth *LightEthereum) startBloomHandlers() {
}()
}
}
-
-const (
- // bloomConfirms is the number of confirmation blocks before a bloom section is
- // considered probably final and its rotated bits are calculated.
- bloomConfirms = 256
-
- // bloomThrottling is the time to wait between processing two consecutive index
- // sections. It's useful during chain upgrades to prevent disk overload.
- bloomThrottling = 100 * time.Millisecond
-)
diff --git a/les/serverpool.go b/les/serverpool.go
index a84c29c3a..da73b4b3c 100644
--- a/les/serverpool.go
+++ b/les/serverpool.go
@@ -73,7 +73,6 @@ const (
// and a short term value which is adjusted exponentially with a factor of
// pstatRecentAdjust with each dial/connection and also returned exponentially
// to the average with the time constant pstatReturnToMeanTC
- pstatRecentAdjust = 0.1
pstatReturnToMeanTC = time.Hour
// node address selection weight is dropped by a factor of exp(-addrFailDropLn) after
// each unsuccessful connection (restored after a successful one)
@@ -83,9 +82,6 @@ const (
responseScoreTC = time.Millisecond * 100
delayScoreTC = time.Second * 5
timeoutPow = 10
- // peerSelectMinWeight is added to calculated weights at request peer selection
- // to give poorly performing peers a little chance of coming back
- peerSelectMinWeight = 0.005
// initStatsWeight is used to initialize previously unknown peers with good
// statistics to give a chance to prove themselves
initStatsWeight = 1
diff --git a/les/sync.go b/les/sync.go
index c0e17f97d..c3d37e2f3 100644
--- a/les/sync.go
+++ b/les/sync.go
@@ -25,11 +25,6 @@ import (
"github.com/ethereum/go-ethereum/light"
)
-const (
- //forceSyncCycle = 10 * time.Second // Time interval to force syncs, even if few peers are available
- minDesiredPeerCount = 5 // Amount of peers desired to start syncing
-)
-
// syncer is responsible for periodically synchronising with the network, both
// downloading hashes and blocks as well as handling the announcement handler.
func (pm *ProtocolManager) syncer() {