mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
lnwire: add QueryOptions to QueryChannelRange
This commit is contained in:
@@ -1167,6 +1167,23 @@ func TestLightningWireProtocol(t *testing.T) {
|
||||
|
||||
v[0] = reflect.ValueOf(req)
|
||||
},
|
||||
MsgQueryChannelRange: func(v []reflect.Value, r *rand.Rand) {
|
||||
req := QueryChannelRange{
|
||||
FirstBlockHeight: uint32(r.Int31()),
|
||||
NumBlocks: uint32(r.Int31()),
|
||||
ExtraData: make([]byte, 0),
|
||||
}
|
||||
|
||||
_, err := rand.Read(req.ChainHash[:])
|
||||
require.NoError(t, err)
|
||||
|
||||
// With a 50/50 change, we'll set a query option.
|
||||
if r.Int31()%2 == 0 {
|
||||
req.QueryOptions = NewTimestampQueryOption()
|
||||
}
|
||||
|
||||
v[0] = reflect.ValueOf(req)
|
||||
},
|
||||
MsgPing: func(v []reflect.Value, r *rand.Rand) {
|
||||
// We use a special message generator here to ensure we
|
||||
// don't generate ping messages that are too large,
|
||||
|
Reference in New Issue
Block a user