From e200b892dd589883132e87d8e38c06f06f001c3d Mon Sep 17 00:00:00 2001 From: acud <12988138+acud@users.noreply.github.com> Date: Wed, 9 Sep 2026 12:43:47 -0600 Subject: [PATCH] chore: remove swarmageddon mentions --- pkg/replicas/getter.go | 11 +++-------- pkg/replicas/getter_test.go | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/pkg/replicas/getter.go b/pkg/replicas/getter.go index bfa46c2005a..cace29b8407 100644 --- a/pkg/replicas/getter.go +++ b/pkg/replicas/getter.go @@ -19,14 +19,9 @@ import ( "github.com/ethersphere/bee/v2/pkg/swarm" ) -// ErrSwarmageddon is returned in case of a vis mayor called Swarmageddon. -// Swarmageddon is the situation when none of the replicas can be retrieved. -// If 2^{depth} replicas were uploaded and they all have valid postage stamps -// then the probability of Swarmageddon is less than 0.000001 -// assuming the error rate of chunk retrievals stays below the level expressed -// as depth by the publisher. var ( - ErrSwarmageddon = errors.New("swarmageddon has begun") + // ErrContentNotFound is returned when content and erasure coded content cannot be found. + ErrContentNotFound = errors.New("erasure coded content not found") // errGetterExhausted is returned when the retry loop exhausts all levels without // receiving a result or enough errors to trigger ErrSwarmageddon. // This path should never be reached under normal operation. @@ -115,7 +110,7 @@ func (g *getter) Get(ctx context.Context, addr swarm.Address) (ch swarm.Chunk, e errs = errors.Join(errs, err) errcnt++ if errcnt > total { - return nil, errors.Join(ErrSwarmageddon, errs) + return nil, errors.Join(ErrContentNotFound, errs) } // ticker switches on the address channel diff --git a/pkg/replicas/getter_test.go b/pkg/replicas/getter_test.go index 33b586fc189..fabf38a5540 100644 --- a/pkg/replicas/getter_test.go +++ b/pkg/replicas/getter_test.go @@ -195,7 +195,7 @@ func TestGetter(t *testing.T) { t.Run("returns correct error", func(t *testing.T) { if tc.level > 0 { - if !errors.Is(err, replicas.ErrSwarmageddon) { + if !errors.Is(err, replicas.ErrContentNotFound) { t.Fatalf("incorrect error. want Swarmageddon. got %v", err) } }