Skip to content

Commit

Permalink
fix: change maxNeighborsNum to avoid data trash
Browse files Browse the repository at this point in the history
  • Loading branch information
krish-nr committed Jan 23, 2024
1 parent 8a8939b commit 09f9c79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions p2p/discover/v4_udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -836,10 +836,10 @@ func (t *UDPv4) verifyENRRequest(h *packetHandlerV4, from *net.UDPAddr, fromID e
}

func (t *UDPv4) handleENRRequest(h *packetHandlerV4, from *net.UDPAddr, fromID enode.ID, mac []byte) {
log.Info("handle ENR reqeust", "from", from, "fromID", fromID)
log.Debug("handle ENR reqeust", "from", from, "fromID", fromID)
record := t.localNode.Node().Record()
for i, p := range record.GetPairs() {
log.Info("ENR pairs", "index", i, "key", p.GetPairKey(), "value", p.GetPairValue())
log.Trace("ENR pairs", "index", i, "key", p.GetPairKey(), "value", p.GetPairValue())
}
t.send(from, fromID, &v4wire.ENRResponse{
ReplyTok: mac,
Expand Down
2 changes: 1 addition & 1 deletion p2p/discover/v4wire/v4wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ type (
)

// MaxNeighbors is the maximum number of neighbor nodes in a Neighbors packet.
const MaxNeighbors = 20
const MaxNeighbors = 12

// This code computes the MaxNeighbors constant value.

Expand Down

0 comments on commit 09f9c79

Please sign in to comment.