forked from cerc-io/plugeth
all: fix some typos (#25551)
* Fix some typos * Fix some mistakes * Revert 4byte.json * Fix an incorrect fix * Change files to fails
This commit is contained in:
@@ -525,7 +525,7 @@ func (t *UDPv4) readLoop(unhandled chan<- ReadPacket) {
|
||||
t.log.Debug("Temporary UDP read error", "err", err)
|
||||
continue
|
||||
} else if err != nil {
|
||||
// Shut down the loop for permament errors.
|
||||
// Shut down the loop for permanent errors.
|
||||
if !errors.Is(err, io.EOF) {
|
||||
t.log.Debug("UDP read error", "err", err)
|
||||
}
|
||||
|
||||
@@ -625,7 +625,7 @@ func (t *UDPv5) readLoop() {
|
||||
t.log.Debug("Temporary UDP read error", "err", err)
|
||||
continue
|
||||
} else if err != nil {
|
||||
// Shut down the loop for permament errors.
|
||||
// Shut down the loop for permanent errors.
|
||||
if !errors.Is(err, io.EOF) {
|
||||
t.log.Debug("UDP read error", "err", err)
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ const tuningImpact = 0.25
|
||||
// local link is saturated. In that case, the live measurements will force us
|
||||
// to reduce request sizes until the throughput gets stable.
|
||||
//
|
||||
// Lastly, message rate measurements allows us to detect if a peer is unsuaully
|
||||
// Lastly, message rate measurements allows us to detect if a peer is unusually
|
||||
// slow compared to other peers, in which case we can decide to keep it around
|
||||
// or free up the slot so someone closer.
|
||||
//
|
||||
@@ -127,7 +127,7 @@ type Tracker struct {
|
||||
// in their sizes.
|
||||
//
|
||||
// Callers of course are free to use the item counter as a byte counter if
|
||||
// or when their protocol of choise if capped by bytes instead of items.
|
||||
// or when their protocol of choice if capped by bytes instead of items.
|
||||
// (eg. eth.getHeaders vs snap.getAccountRange).
|
||||
capacity map[uint64]float64
|
||||
|
||||
@@ -157,7 +157,7 @@ func NewTracker(caps map[uint64]float64, rtt time.Duration) *Tracker {
|
||||
}
|
||||
|
||||
// Capacity calculates the number of items the peer is estimated to be able to
|
||||
// retrieve within the alloted time slot. The method will round up any division
|
||||
// retrieve within the allotted time slot. The method will round up any division
|
||||
// errors and will add an additional overestimation ratio on top. The reason for
|
||||
// overshooting the capacity is because certain message types might not increase
|
||||
// the load proportionally to the requested items, so fetching a bit more might
|
||||
|
||||
@@ -121,7 +121,7 @@ func (t *Tracker) Track(peer string, version uint, reqCode uint64, resCode uint6
|
||||
}
|
||||
|
||||
// clean is called automatically when a preset time passes without a response
|
||||
// being dleivered for the first network request.
|
||||
// being delivered for the first network request.
|
||||
func (t *Tracker) clean() {
|
||||
t.lock.Lock()
|
||||
defer t.lock.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user