From 63c8cfe4c39e59b8b06df252ed1e735e9a94baaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Elek?= Date: Mon, 31 Jul 2023 18:45:55 +0200 Subject: [PATCH] satellite/nodeselection: remove CountryCodeExclude We don't need it any more, as CountryCode uses location.Set, which supports exclusion (`Without`). Change-Id: Ie311ae19fefa0bc9a0161496af1233ef4a6607df --- satellite/nodeselection/filter.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/satellite/nodeselection/filter.go b/satellite/nodeselection/filter.go index 642e372d5..518ac61b5 100644 --- a/satellite/nodeselection/filter.go +++ b/satellite/nodeselection/filter.go @@ -59,24 +59,6 @@ func (n NodeFilters) WithExcludedIDs(ds []storj.NodeID) NodeFilters { var _ NodeFilter = NodeFilters{} -// CountryCodeExclude is a specific CountryFilter which excludes all nodes with the given country code. -type CountryCodeExclude []location.CountryCode - -// MatchInclude implements NodeFilter interface. -func (c CountryCodeExclude) MatchInclude(node *SelectedNode) bool { - for _, code := range c { - if code == location.None { - continue - } - if node.CountryCode == code { - return false - } - } - return true -} - -var _ NodeFilter = CountryCodeExclude{} - // CountryFilter can select nodes based on the condition of the country code. type CountryFilter struct { permit location.Set