Skip to content

Commit dd61acd

Browse files
committed
lnwire: remove stale pong limit error
Drop the unused pong limit decode error now that ping deserialization accepts the full uint16 wire range. Update the randomized ping generator to cover the full range so the property tests exercise the no-reply sentinel values too.
1 parent 08b26b6 commit dd61acd

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

lnwire/pong.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package lnwire
22

33
import (
44
"bytes"
5-
"fmt"
65
"io"
76
)
87

@@ -11,10 +10,6 @@ import (
1110
// 2 bytes, leaving 65531 bytes.
1211
const MaxPongBytes = 65531
1312

14-
// ErrMaxPongBytesExceeded indicates that the NumPongBytes field from the ping
15-
// message has exceeded MaxPongBytes.
16-
var ErrMaxPongBytesExceeded = fmt.Errorf("pong bytes exceeded")
17-
1813
// PongPayload is a set of opaque bytes sent in response to a ping message.
1914
type PongPayload []byte
2015

lnwire/test_message.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1541,7 +1541,7 @@ var _ TestMessage = (*Ping)(nil)
15411541
//
15421542
// This is part of the TestMessage interface.
15431543
func (p *Ping) RandTestMessage(t *rapid.T) Message {
1544-
numPongBytes := uint16(rapid.IntRange(0, int(MaxPongBytes)).Draw(
1544+
numPongBytes := uint16(rapid.IntRange(0, math.MaxUint16).Draw(
15451545
t, "numPongBytes"),
15461546
)
15471547

0 commit comments

Comments
 (0)