Skip to content

Commit

Permalink
add subscriber
Browse files Browse the repository at this point in the history
  • Loading branch information
MatusKysel committed Jul 17, 2024
1 parent ad6844d commit 264a3c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions network/p2p/p2p_genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/pkg/errors"
genesisspectypes "github.com/ssvlabs/ssv-spec-pre-cc/types"
spectypes "github.com/ssvlabs/ssv-spec/types"
"github.com/ssvlabs/ssv/logging/fields"
"github.com/ssvlabs/ssv/network/commons"
p2pprotocol "github.com/ssvlabs/ssv/protocol/v2/p2p"
Expand Down Expand Up @@ -59,3 +60,8 @@ func (p *GenesisP2p) Broadcast(message *genesisspectypes.SSVMessage) error {
}
return nil
}

// Subscribe subscribes to validator subnet
func (n *GenesisP2p) Subscribe(pk genesisspectypes.ValidatorPK) error {
return n.Network.Subscribe(spectypes.ValidatorPK(pk[:]))
}

0 comments on commit 264a3c3

Please sign in to comment.