lnwire: fix unit test flake for Ping message
This commit is contained in:
1 file changed
+3
-2
@@ -937,8 +937,9 @@ func TestLightningWireProtocol(t *testing.T) {
|
|||||||
//
|
//
|
||||||
// We'll allow the test to generate padding bytes up to
|
// We'll allow the test to generate padding bytes up to
|
||||||
// the max message limit, factoring in the 2 bytes for
|
// the max message limit, factoring in the 2 bytes for
|
||||||
// the num pong bytes.
|
// the num pong bytes and 2 bytes for encoding the
|
||||||
paddingBytes := make([]byte, r.Intn(MaxMsgBody-1))
|
// length of the padding bytes.
|
||||||
|
paddingBytes := make([]byte, rand.Intn(MaxMsgBody-3))
|
||||||
req := Ping{
|
req := Ping{
|
||||||
NumPongBytes: uint16(r.Intn(MaxPongBytes + 1)),
|
NumPongBytes: uint16(r.Intn(MaxPongBytes + 1)),
|
||||||
PaddingBytes: paddingBytes,
|
PaddingBytes: paddingBytes,
|
||||||
|
|||||||
Reference in new issue
Block a user