From 1465e6fdeacd7ec15e52451cc57f7d462c99b434 Mon Sep 17 00:00:00 2001 From: acud <12988138+acud@users.noreply.github.com> Date: Wed, 11 Feb 2026 09:23:52 -0600 Subject: [PATCH] chore: remove timebomb --- Makefile | 4 +--- cmd/bee/cmd/start.go | 3 --- cmd/bee/cmd/timebomb.go | 46 ----------------------------------------- 3 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 cmd/bee/cmd/timebomb.go diff --git a/Makefile b/Makefile index 047f5d4f8be..504f87cb190 100644 --- a/Makefile +++ b/Makefile @@ -19,11 +19,9 @@ BEE_API_VERSION ?= "$(shell grep '^ version:' openapi/Swarm.yaml | awk '{print VERSION ?= "$(shell git describe --tags --abbrev=0 | cut -c2-)" COMMIT_HASH ?= "$(shell git describe --long --dirty --always --match "" || true)" CLEAN_COMMIT ?= "$(shell git describe --long --always --match "" || true)" -COMMIT_TIME ?= "$(shell git show -s --format=%ct $(CLEAN_COMMIT) || true)" LDFLAGS ?= -s -w \ -X github.com/ethersphere/bee/v2.version="$(VERSION)" \ -X github.com/ethersphere/bee/v2.commitHash="$(COMMIT_HASH)" \ --X github.com/ethersphere/bee/v2.commitTime="$(COMMIT_TIME)" \ -X github.com/ethersphere/bee/v2/pkg/api.Version="$(BEE_API_VERSION)" \ -X github.com/ethersphere/bee/v2/pkg/p2p/libp2p.reachabilityOverridePublic="$(REACHABILITY_OVERRIDE_PUBLIC)" \ -X github.com/ethersphere/bee/v2/pkg/postage/listener.batchFactorOverridePublic="$(BATCHFACTOR_OVERRIDE_PUBLIC)" @@ -172,4 +170,4 @@ clean: $(GO) clean rm -rf dist/ -FORCE: \ No newline at end of file +FORCE: diff --git a/cmd/bee/cmd/start.go b/cmd/bee/cmd/start.go index 9633b9bd6f1..b279f893b4f 100644 --- a/cmd/bee/cmd/start.go +++ b/cmd/bee/cmd/start.go @@ -68,11 +68,8 @@ func (c *command) initStartCmd() (err error) { } fmt.Print(beeWelcomeMessage) - fmt.Printf("\n\nversion: %v - planned to be supported until %v, please follow https://ethswarm.org/\n\n", bee.Version, endSupportDate()) logger.Info("bee version", "version", bee.Version) - go startTimeBomb(logger) - // ctx is global context of bee node; which is canceled after interrupt signal is received. ctx, cancel := context.WithCancel(context.Background()) sysInterruptChannel := make(chan os.Signal, 1) diff --git a/cmd/bee/cmd/timebomb.go b/cmd/bee/cmd/timebomb.go deleted file mode 100644 index f53f74627c3..00000000000 --- a/cmd/bee/cmd/timebomb.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 The Swarm Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cmd - -import ( - "strconv" - "time" - - "github.com/ethersphere/bee/v2" - "github.com/ethersphere/bee/v2/pkg/log" -) - -const ( - limitDays = 90 - warningDays = 0.9 * limitDays // show warning once 90% of the time bomb time has passed - sleepFor = 30 * time.Minute -) - -var ( - commitTime, _ = strconv.ParseInt(bee.CommitTime(), 10, 64) - versionReleased = time.Unix(commitTime, 0) -) - -func startTimeBomb(logger log.Logger) { - for { - outdated := time.Now().AddDate(0, 0, -limitDays) - - if versionReleased.Before(outdated) { - logger.Warning("your node is outdated, please check for the latest version") - } else { - almostOutdated := time.Now().AddDate(0, 0, -warningDays) - - if versionReleased.Before(almostOutdated) { - logger.Warning("your node is almost outdated, please check for the latest version") - } - } - - <-time.After(sleepFor) - } -} - -func endSupportDate() string { - return versionReleased.AddDate(0, 0, limitDays).Format("2 January 2006") -}