From b53d27d48e1a7bbf2333c2790a90695b7caa8439 Mon Sep 17 00:00:00 2001 From: Cassandra Heart Date: Thu, 13 Feb 2025 12:24:51 -0600 Subject: [PATCH] don't prepend network to bitmask for list --- node/p2p/blossomsub.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/node/p2p/blossomsub.go b/node/p2p/blossomsub.go index a7cb340..6521ac9 100644 --- a/node/p2p/blossomsub.go +++ b/node/p2p/blossomsub.go @@ -729,10 +729,7 @@ func (b *BlossomSub) GetPeerID() []byte { } func (b *BlossomSub) GetRandomPeer(bitmask []byte) ([]byte, error) { - // TODO: Fix this, it is broken - the bitmask parameter is not sliced, and the - // network is not pre-pended to the bitmask. - networkBitmask := append([]byte{b.p2pConfig.Network}, bitmask...) - peers := b.ps.ListPeers(networkBitmask) + peers := b.ps.ListPeers(bitmask) if len(peers) == 0 { return nil, errors.Wrap( ErrNoPeersAvailable,