mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-05-28 12:39:51 +02:00
lnwire: fix unit test flake for Ping
message
This commit is contained in:
parent
b565f4f536
commit
70bd6d1a11
@ -937,8 +937,9 @@ func TestLightningWireProtocol(t *testing.T) {
|
||||
//
|
||||
// We'll allow the test to generate padding bytes up to
|
||||
// the max message limit, factoring in the 2 bytes for
|
||||
// the num pong bytes.
|
||||
paddingBytes := make([]byte, r.Intn(MaxMsgBody-1))
|
||||
// the num pong bytes and 2 bytes for encoding the
|
||||
// length of the padding bytes.
|
||||
paddingBytes := make([]byte, rand.Intn(MaxMsgBody-3))
|
||||
req := Ping{
|
||||
NumPongBytes: uint16(r.Intn(MaxPongBytes + 1)),
|
||||
PaddingBytes: paddingBytes,
|
||||
|
Loading…
x
Reference in New Issue
Block a user