From 288f5c62594509620bfe564480324d36d990301f Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Mon, 8 Dec 2025 20:55:56 +0000 Subject: [PATCH] chore: remove unused code --- waku/v2/protocol/enr/shards.go | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/waku/v2/protocol/enr/shards.go b/waku/v2/protocol/enr/shards.go index 29adc2d5..de1e7a57 100644 --- a/waku/v2/protocol/enr/shards.go +++ b/waku/v2/protocol/enr/shards.go @@ -1,10 +1,9 @@ package enr import ( - "errors" - "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enr" + "github.com/waku-org/go-waku/waku/v2/protocol" ) @@ -43,21 +42,6 @@ func WithWakuRelaySharding(rs protocol.RelayShards) ENROption { } } -func WithWakuRelayShardingTopics(topics ...string) ENROption { - return func(localnode *enode.LocalNode) error { - rs, err := protocol.TopicsToRelayShards(topics...) - if err != nil { - return err - } - - if len(rs) != 1 { - return errors.New("expected a single RelayShards") - } - - return WithWakuRelaySharding(rs[0])(localnode) - } -} - // ENR record accessors func RelayShardList(record *enr.Record) (*protocol.RelayShards, error) {