From 8a541d3339349d51c9a2afe25cd59090d98c3db3 Mon Sep 17 00:00:00 2001 From: huajin tong <137764712+thirdkeyword@users.noreply.github.com> Date: Thu, 28 Nov 2024 17:47:00 +0800 Subject: [PATCH] chore: fix some comments and method name (#4916) Signed-off-by: thirdkeyword --- pkg/api/soc.go | 2 +- pkg/settlement/swap/addressbook.go | 2 +- pkg/storer/sample_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/api/soc.go b/pkg/api/soc.go index a30cc1174f6..9f0f838bfc9 100644 --- a/pkg/api/soc.go +++ b/pkg/api/soc.go @@ -248,7 +248,7 @@ func (s *Service) socGetHandler(w http.ResponseWriter, r *http.Request) { } socCh, err := soc.FromChunk(sch) if err != nil { - logger.Error(err, "chunk is not a signle owner chunk") + logger.Error(err, "chunk is not a single owner chunk") jsonhttp.InternalServerError(w, "chunk is not a single owner chunk") return } diff --git a/pkg/settlement/swap/addressbook.go b/pkg/settlement/swap/addressbook.go index 5cf0aad45f8..5a7b0a17df5 100644 --- a/pkg/settlement/swap/addressbook.go +++ b/pkg/settlement/swap/addressbook.go @@ -38,7 +38,7 @@ type Addressbook interface { PutChequebook(peer swarm.Address, chequebook common.Address) error // AddDeductionFor peer stores the flag indicating the peer have already issued a cheque that has been deducted AddDeductionFor(peer swarm.Address) error - // AddDeductionFor peer stores the flag indicating the peer have already received a cheque that has been deducted + // AddDeductionBy peer stores the flag indicating the peer have already issued a cheque that has been deducted AddDeductionBy(peer swarm.Address) error // GetDeductionFor returns whether a peer have already issued a cheque that has been deducted GetDeductionFor(peer swarm.Address) (bool, error) diff --git a/pkg/storer/sample_test.go b/pkg/storer/sample_test.go index 07f4e36cd6d..fd39882d367 100644 --- a/pkg/storer/sample_test.go +++ b/pkg/storer/sample_test.go @@ -225,7 +225,7 @@ func TestReserveSamplerSisterNeighborhood(t *testing.T) { for _, s := range sample.Items { if got := swarm.Proximity(s.ChunkAddress.Bytes(), baseAddr.Bytes()); got != depthOfResponsibility { - t.Fatalf("promixity must be exactly %d, got %d", depthOfResponsibility, got) + t.Fatalf("proximity must be exactly %d, got %d", depthOfResponsibility, got) } }