From 28c0f6ab32cd69e4b18e9e4b550ef6ce059a9d1a Mon Sep 17 00:00:00 2001 From: Vehorny <153144728+vehorny@users.noreply.github.com> Date: Thu, 25 Jan 2024 07:09:53 +0100 Subject: [PATCH] chore(p2p/host): fix typos (#2683) * readme * scope * natmgr * svc --------- Co-authored-by: Sukun --- p2p/host/resource-manager/README.md | 2 +- p2p/host/resource-manager/scope_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/p2p/host/resource-manager/README.md b/p2p/host/resource-manager/README.md index 72eb192ad7..68ce0aa01b 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 abef4762d5..7bf7ff721b 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)