From c9683453c01fb7c071ba9c3beb0c29215bb05802 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 10 Mar 2024 13:13:25 -0400 Subject: [PATCH] feat: add RedundancySettings getter --- renter/renter.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/renter/renter.go b/renter/renter.go index 13f187b..0824861 100644 --- a/renter/renter.go +++ b/renter/renter.go @@ -278,3 +278,14 @@ func (r *RenterDefault) GougingSettings(ctx context.Context) (api.GougingSetting return settings, nil } + +func (r *RenterDefault) RedundancySettings(ctx context.Context) (api.RedundancySettings, error) { + var settings api.RedundancySettings + err := r.GetSetting(ctx, api.SettingRedundancy, &settings) + + if err != nil { + return api.RedundancySettings{}, err + } + + return settings, nil +}