diff --git a/p2p/host/resource-manager/README.md b/p2p/host/resource-manager/README.md index 72eb192ad..68ce0aa01 100644 --- a/p2p/host/resource-manager/README.md +++ b/p2p/host/resource-manager/README.md @@ -161,7 +161,7 @@ belong to some service in the system. Hence, this suggests that apart from global limits, we can constrain stream usage at finer granularity, at the protocol and service level. -Once again, we disinguish between inbound and outbound streams. +Once again, we distinguish between inbound and outbound streams. Inbound streams are initiated by remote peers and consume resources in response to network events; controlling inbound stream usage is again paramount for protecting the system from overload or attack. diff --git a/p2p/host/resource-manager/scope_test.go b/p2p/host/resource-manager/scope_test.go index abef4762d..7bf7ff721 100644 --- a/p2p/host/resource-manager/scope_test.go +++ b/p2p/host/resource-manager/scope_test.go @@ -74,7 +74,7 @@ func TestCheckMemory(t *testing.T) { limit = 1024 } currentMem = (currentMem % limit) // We can't have reserved more than our limit - res = (res >> 14) // We won't resonably ever have a reservation > 2^50 + res = (res >> 14) // We won't reasonably ever have a reservation > 2^50 rc := resources{limit: &BaseLimit{ Memory: int64(limit), StreamsInbound: 1, @@ -88,7 +88,7 @@ func TestCheckMemory(t *testing.T) { rc.memory = int64(currentMem) priShift = (priShift % 9) - // Check different priorties at 2^0, 2^1,...2^8. This lets our math be correct in the check below (and avoid overflows). + // Check different priorities at 2^0, 2^1,...2^8. This lets our math be correct in the check below (and avoid overflows). pri := uint8((1 << priShift) - 1) err := rc.checkMemory(int64(res), pri)