mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-12 20:50:05 +00:00
deprecate node p2p config (#3192)
This commit is contained in:
parent
4e886a84f9
commit
e31792f999
@ -192,7 +192,7 @@ func (b *BeaconNode) startDB(ctx *cli.Context) error {
|
||||
}
|
||||
|
||||
func (b *BeaconNode) registerP2P(ctx *cli.Context) error {
|
||||
beaconp2p, err := configureP2P(ctx)
|
||||
beaconp2p, err := deprecatedConfigureP2P(ctx)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not register p2p service")
|
||||
}
|
||||
|
@ -13,7 +13,8 @@ import (
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
var topicMappings = map[pb.Topic]proto.Message{
|
||||
// Deprecated: Do not use. See #3147.
|
||||
var deprecatedTopicMappings = map[pb.Topic]proto.Message{
|
||||
pb.Topic_BEACON_BLOCK_ANNOUNCE: &pb.BeaconBlockAnnounce{},
|
||||
pb.Topic_BEACON_BLOCK_REQUEST: &pb.BeaconBlockRequest{},
|
||||
pb.Topic_BEACON_BLOCK_REQUEST_BY_SLOT_NUMBER: &pb.BeaconBlockRequestBySlotNumber{},
|
||||
@ -28,7 +29,8 @@ var topicMappings = map[pb.Topic]proto.Message{
|
||||
pb.Topic_BEACON_ATTESTATION: ðpb.Attestation{},
|
||||
}
|
||||
|
||||
func configureP2P(ctx *cli.Context) (*p2p.Server, error) {
|
||||
// Deprecated: Do not use. See #3147.
|
||||
func deprecatedConfigureP2P(ctx *cli.Context) (*p2p.Server, error) {
|
||||
contractAddress := ctx.GlobalString(flags.DepositContractFlag.Name)
|
||||
if contractAddress == "" {
|
||||
var err error
|
||||
@ -65,7 +67,7 @@ func configureP2P(ctx *cli.Context) (*p2p.Server, error) {
|
||||
adapters = append(adapters, metric.New())
|
||||
}
|
||||
|
||||
for k, v := range topicMappings {
|
||||
for k, v := range deprecatedTopicMappings {
|
||||
s.RegisterTopic(k.String(), v, adapters...)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user