From ca73cea3bbc53b30046fbf09fce22f1f385a81c0 Mon Sep 17 00:00:00 2001 From: rizkyikiw42 Date: Fri, 22 Aug 2025 17:27:35 +0800 Subject: [PATCH] docs(msgrate): Fix inaccuracies in documentation --- p2p/msgrate/msgrate.go | 8 ++++---- rpc/json.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/p2p/msgrate/msgrate.go b/p2p/msgrate/msgrate.go index 7702256ed4..f8c6bfb043 100644 --- a/p2p/msgrate/msgrate.go +++ b/p2p/msgrate/msgrate.go @@ -67,7 +67,7 @@ const rttMinConfidence = 0.1 // ttlScaling is the multiplier that converts the estimated roundtrip time to a // timeout cap for network requests. The expectation is that peers' response time -// will fluctuate around the estimated roundtrip, but depending in their load at +// will fluctuate around the estimated roundtrip, but depending on their load at // request time, it might be higher than anticipated. This scaling factor ensures // that we allow remote connections some slack but at the same time do enforce a // behavior similar to our median peers. @@ -81,8 +81,8 @@ const ttlLimit = time.Minute // tuningConfidenceCap is the number of active peers above which to stop detuning // the confidence number. The idea here is that once we hone in on the capacity -// of a meaningful number of peers, adding one more should ot have a significant -// impact on things, so just ron with the originals. +// of a meaningful number of peers, adding one more should not have a significant +// impact on things, so just run with the originals. const tuningConfidenceCap = 10 // tuningImpact is the influence that a new tuning target has on the previously @@ -344,7 +344,7 @@ func (t *Trackers) meanCapacities() map[uint64]float64 { } // TargetRoundTrip returns the current target round trip time for a request to -// complete in.The returned RTT is slightly under the estimated RTT. The reason +// complete in. The returned RTT is slightly under the estimated RTT. The reason // is that message rate estimation is a 2 dimensional problem which is solvable // for any RTT. The goal is to gravitate towards smaller RTTs instead of large // messages, to result in a stabler download stream. diff --git a/rpc/json.go b/rpc/json.go index fcd801fc95..96b8939da4 100644 --- a/rpc/json.go +++ b/rpc/json.go @@ -58,7 +58,7 @@ type jsonrpcSubscriptionNotification struct { Params subscriptionResultEnc `json:"params"` } -// A value of this type can a JSON-RPC request, notification, successful response or +// A value of this type can be a JSON-RPC request, notification, successful response or // error response. Which one it is depends on the fields. type jsonrpcMessage struct { Version string `json:"jsonrpc,omitempty"`