mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-03-10 02:38:47 +08:00
don't prepend network to bitmask for list
This commit is contained in:
parent
6f02e7b54f
commit
b53d27d48e
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user