Skip to content

Commit

Permalink
Completed all recommended removals in #1428. Did not address any othe…
Browse files Browse the repository at this point in the history
…r changes in the original PR outside the scope of this issue
  • Loading branch information
alarso16 committed Jan 28, 2025
1 parent a55c3b5 commit 8c8262f
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 307 deletions.
46 changes: 0 additions & 46 deletions plugin/evm/gossip_stats.go

This file was deleted.

76 changes: 0 additions & 76 deletions plugin/evm/handler.go

This file was deleted.

7 changes: 1 addition & 6 deletions plugin/evm/message/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,14 @@ const (
maxMessageSize = 2*units.MiB - 64*units.KiB // Subtract 64 KiB from p2p network cap to leave room for encoding overhead from AvalancheGo
)

var (
Codec codec.Manager
)
var Codec codec.Manager

func init() {
Codec = codec.NewManager(maxMessageSize)
c := linearcodec.NewDefault()

errs := wrappers.Errs{}
errs.Add(
// Gossip types
c.RegisterType(EthTxsGossip{}),

// Types for state sync frontier consensus
c.RegisterType(SyncSummary{}),

Expand Down
19 changes: 1 addition & 18 deletions plugin/evm/message/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,10 @@ package message
import (
"context"

"github.com/ethereum/go-ethereum/log"

"github.com/ava-labs/avalanchego/ids"
)

var (
_ GossipHandler = NoopMempoolGossipHandler{}
_ RequestHandler = NoopRequestHandler{}
)

// GossipHandler handles incoming gossip messages
type GossipHandler interface {
HandleEthTxs(nodeID ids.NodeID, msg EthTxsGossip) error
}

type NoopMempoolGossipHandler struct{}

func (NoopMempoolGossipHandler) HandleEthTxs(nodeID ids.NodeID, msg EthTxsGossip) error {
log.Debug("dropping unexpected EthTxsGossip message", "peerID", nodeID)
return nil
}
var _ RequestHandler = NoopRequestHandler{}

// RequestHandler interface handles incoming requests from peers
// Must have methods in format of handleType(context.Context, ids.NodeID, uint32, request Type) error
Expand Down
41 changes: 0 additions & 41 deletions plugin/evm/message/handler_test.go

This file was deleted.

65 changes: 0 additions & 65 deletions plugin/evm/message/message.go

This file was deleted.

55 changes: 0 additions & 55 deletions plugin/evm/message/message_test.go

This file was deleted.

0 comments on commit 8c8262f

Please sign in to comment.