aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader/downloader.go
diff options
context:
space:
mode:
authorYusup <awklsgrep@gmail.com>2018-04-04 18:25:02 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-04-04 18:25:02 +0800
commit7aad81f8815084c8ed032705fbaf6d3710e518cf (patch)
treea79cccc5f2040ac2ec496ca18e7381390c30fbc7 /eth/downloader/downloader.go
parent2a4bd55b43df92fe2f83468656ca03199596bceb (diff)
downloadgo-tangerine-7aad81f8815084c8ed032705fbaf6d3710e518cf.tar
go-tangerine-7aad81f8815084c8ed032705fbaf6d3710e518cf.tar.gz
go-tangerine-7aad81f8815084c8ed032705fbaf6d3710e518cf.tar.bz2
go-tangerine-7aad81f8815084c8ed032705fbaf6d3710e518cf.tar.lz
go-tangerine-7aad81f8815084c8ed032705fbaf6d3710e518cf.tar.xz
go-tangerine-7aad81f8815084c8ed032705fbaf6d3710e518cf.tar.zst
go-tangerine-7aad81f8815084c8ed032705fbaf6d3710e518cf.zip
eth: fix typos (#16414)
Diffstat (limited to 'eth/downloader/downloader.go')
-rw-r--r--eth/downloader/downloader.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index 62842adbc..9e4949899 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -47,7 +47,7 @@ var (
MaxForkAncestry = 3 * params.EpochDuration // Maximum chain reorganisation
rttMinEstimate = 2 * time.Second // Minimum round-trip time to target for download requests
- rttMaxEstimate = 20 * time.Second // Maximum rount-trip time to target for download requests
+ rttMaxEstimate = 20 * time.Second // Maximum round-trip time to target for download requests
rttMinConfidence = 0.1 // Worse confidence factor in our estimated RTT value
ttlScaling = 3 // Constant scaling factor for RTT -> TTL conversion
ttlLimit = time.Minute // Maximum TTL allowance to prevent reaching crazy timeouts
@@ -884,7 +884,7 @@ func (d *Downloader) fetchHeaders(p *peerConnection, from uint64, pivot uint64)
// immediately to the header processor to keep the rest of the pipeline full even
// in the case of header stalls.
//
-// The method returs the entire filled skeleton and also the number of headers
+// The method returns the entire filled skeleton and also the number of headers
// already forwarded for processing.
func (d *Downloader) fillHeaderSkeleton(from uint64, skeleton []*types.Header) ([]*types.Header, int, error) {
log.Debug("Filling up skeleton", "from", from)
@@ -1377,7 +1377,7 @@ func (d *Downloader) processFastSyncContent(latest *types.Header) error {
pivot = height - uint64(fsMinFullBlocks)
}
// To cater for moving pivot points, track the pivot block and subsequently
- // accumulated download results separatey.
+ // accumulated download results separately.
var (
oldPivot *fetchResult // Locked in pivot block, might change eventually
oldTail []*fetchResult // Downloaded content after the pivot
@@ -1615,7 +1615,7 @@ func (d *Downloader) qosReduceConfidence() {
//
// Note, the returned RTT is .9 of the actually estimated RTT. The reason is that
// the downloader tries to adapt queries to the RTT, so multiple RTT values can
-// be adapted to, but smaller ones are preffered (stabler download stream).
+// be adapted to, but smaller ones are preferred (stabler download stream).
func (d *Downloader) requestRTT() time.Duration {
return time.Duration(atomic.LoadUint64(&d.rttEstimate)) * 9 / 10
}