Commit e4b6585f authored by Danyal Prout's avatar Danyal Prout Committed by GitHub

Force disable req/response sync on bootnode p2p (#9298)

parent 93ca50c3
...@@ -37,7 +37,7 @@ func (g *gossipConfig) P2PSequencerAddress() common.Address { ...@@ -37,7 +37,7 @@ func (g *gossipConfig) P2PSequencerAddress() common.Address {
type l2Chain struct{} type l2Chain struct{}
func (l *l2Chain) PayloadByNumber(_ context.Context, _ uint64) (*eth.ExecutionPayloadEnvelope, error) { func (l *l2Chain) PayloadByNumber(_ context.Context, _ uint64) (*eth.ExecutionPayloadEnvelope, error) {
return nil, nil return nil, errors.New("P2P req/resp is not supported in bootnodes")
} }
func Main(cliCtx *cli.Context) error { func Main(cliCtx *cli.Context) error {
...@@ -60,6 +60,10 @@ func Main(cliCtx *cli.Context) error { ...@@ -60,6 +60,10 @@ func Main(cliCtx *cli.Context) error {
if err != nil { if err != nil {
return fmt.Errorf("failed to load p2p config: %w", err) return fmt.Errorf("failed to load p2p config: %w", err)
} }
if p2pConfig.EnableReqRespSync {
logger.Warn("req-resp sync is enabled, bootnode does not support this feature")
p2pConfig.EnableReqRespSync = false
}
p2pNode, err := p2p.NewNodeP2P(ctx, config, logger, p2pConfig, &gossipNoop{}, &l2Chain{}, &gossipConfig{}, m, false) p2pNode, err := p2p.NewNodeP2P(ctx, config, logger, p2pConfig, &gossipNoop{}, &l2Chain{}, &gossipConfig{}, m, false)
if err != nil || p2pNode == nil { if err != nil || p2pNode == nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment