From 4ff9d5a01f61855826214677e14bec8cc3010451 Mon Sep 17 00:00:00 2001 From: Peter-Jan Brone Date: Wed, 12 Jun 2024 09:23:19 +0200 Subject: [PATCH] Remove unused `slabPruningInterval` from config (#1295) --- bus/client/client_test.go | 5 ++--- cmd/renterd/main.go | 11 +++++------ internal/node/node.go | 11 +++++------ internal/test/e2e/cluster.go | 3 +-- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/bus/client/client_test.go b/bus/client/client_test.go index 6384a9b82..3803584f0 100644 --- a/bus/client/client_test.go +++ b/bus/client/client_test.go @@ -81,9 +81,8 @@ func newTestClient(dir string) (*client.Client, func() error, func(context.Conte DatabaseLog: config.DatabaseLog{ SlowThreshold: 100 * time.Millisecond, }, - Miner: node.NewMiner(client), - SlabPruningInterval: time.Minute, - Logger: zap.NewNop(), + Miner: node.NewMiner(client), + Logger: zap.NewNop(), }, filepath.Join(dir, "bus"), types.GeneratePrivateKey(), zap.New(zapcore.NewNopCore())) if err != nil { return nil, nil, nil, err diff --git a/cmd/renterd/main.go b/cmd/renterd/main.go index d95598b19..e16fd5dbb 100644 --- a/cmd/renterd/main.go +++ b/cmd/renterd/main.go @@ -446,12 +446,11 @@ func main() { network, _ := build.Network() busCfg := node.BusConfig{ - Bus: cfg.Bus, - Database: cfg.Database, - DatabaseLog: cfg.Log.Database, - Logger: logger, - Network: network, - SlabPruningInterval: time.Hour, + Bus: cfg.Bus, + Database: cfg.Database, + DatabaseLog: cfg.Log.Database, + Logger: logger, + Network: network, } type shutdownFn struct { diff --git a/internal/node/node.go b/internal/node/node.go index 4c7bc36d0..c26feb35c 100644 --- a/internal/node/node.go +++ b/internal/node/node.go @@ -41,12 +41,11 @@ type Bus interface { type BusConfig struct { config.Bus - Database config.Database - DatabaseLog config.DatabaseLog - Network *consensus.Network - Logger *zap.Logger - Miner *Miner - SlabPruningInterval time.Duration + Database config.Database + DatabaseLog config.DatabaseLog + Network *consensus.Network + Logger *zap.Logger + Miner *Miner } type AutopilotConfig struct { diff --git a/internal/test/e2e/cluster.go b/internal/test/e2e/cluster.go index 3a7bd2bfa..43288bc8c 100644 --- a/internal/test/e2e/cluster.go +++ b/internal/test/e2e/cluster.go @@ -910,8 +910,7 @@ func testBusCfg() node.BusConfig { IgnoreRecordNotFoundError: true, SlowThreshold: 100 * time.Millisecond, }, - Network: testNetwork(), - SlabPruningInterval: time.Second, + Network: testNetwork(), } }