Skip to content

Commit

Permalink
fix: linting errors in gossiper
Browse files Browse the repository at this point in the history
  • Loading branch information
debaghtk committed Mar 15, 2024
1 parent 5c0a94c commit 384fcb8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
28 changes: 0 additions & 28 deletions plugin/evm/gossiper.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ const (
// signed orders to other nodes.
ordersGossipInterval = 100 * time.Millisecond

// [minGossipBatchInterval] is the minimum amount of time that must pass
// before our last gossip to peers.
minGossipBatchInterval = 50 * time.Millisecond

// [minGossipOrdersBatchInterval] is the minimum amount of time that must pass
// before our last gossip to peers.
minGossipOrdersBatchInterval = 50 * time.Millisecond
Expand Down Expand Up @@ -63,7 +59,6 @@ type legacyPushGossiper struct {
// amplification of mempol chatter.
ethTxsToGossipChan chan []*types.Transaction
ethTxsToGossip map[common.Hash]*types.Transaction
lastGossiped time.Time
shutdownChan chan struct{}
shutdownWg *sync.WaitGroup

Expand Down Expand Up @@ -106,26 +101,3 @@ func (vm *VM) createLegacyGossiper(
net.awaitSignedOrderGossip()
return net
}

// addrStatus used to track the metadata of addresses being queued for
// regossip.
type addrStatus struct {
nonce uint64
txsAdded int
}

// GossipHandler handles incoming gossip messages
type LegacyGossipHandler struct {
mu sync.RWMutex
vm *VM
txPool *txpool.TxPool
stats GossipStats
}

func NewLegacyGossipHandler(vm *VM, stats GossipStats) *LegacyGossipHandler {
return &LegacyGossipHandler{
vm: vm,
txPool: vm.txPool,
stats: stats,
}
}
4 changes: 1 addition & 3 deletions plugin/evm/gossiper_orders.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ func (n *legacyPushGossiper) awaitSignedOrderGossip() {
)
}
case orders := <-n.ordersToGossipChan:
for _, order := range orders {
n.ordersToGossip = append(n.ordersToGossip, order)
}
n.ordersToGossip = append(n.ordersToGossip, orders...)
if attempted, err := n.gossipSignedOrders(); err != nil {
log.Warn(
"failed to send signed orders",
Expand Down

0 comments on commit 384fcb8

Please sign in to comment.