mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-18 21:02:42 +02:00
Merge pull request #7894 from yyforyongyu/fix-lnwire-test-flake
trivial: fix unit test flake for `Ping` message
This commit is contained in:
commit
4a03074fe8
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user