Skip to content

Commit a3ab044

Browse files
committed
tapchannel: prop test chanID is not drawn from rapid
Previously we would draw the chanIDs for our channels from the rapid farmework. This worked for a bit, but after introducing some more strict checks between the HTLC and the assets within the channel it introduced some rare failure cases. We now draw the value from rand which is practically impossible to cause collisions on that value.
1 parent 9fe5e22 commit a3ab044

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tapchannel/aux_invoice_manager_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"encoding/json"
88
"fmt"
99
"math/big"
10+
"math/rand/v2"
1011
"testing"
1112
"time"
1213

@@ -820,11 +821,10 @@ func genHtlc(t *rapid.T, balance []*rfqmsg.AssetBalance,
820821
// method also returns the assetUnits and the rfqID used by the htlc.
821822
func genRequest(t *rapid.T) (lndclient.InvoiceHtlcModifyRequest, uint64,
822823
asset.ID, rfqmsg.ID) {
823-
824824
request := lndclient.InvoiceHtlcModifyRequest{
825825
CircuitKey: invoices.CircuitKey{
826826
ChanID: lnwire.NewShortChanIDFromInt(
827-
rapid.Uint64().Draw(t, "chan_id"),
827+
rand.Uint64(),
828828
),
829829
},
830830
}

0 commit comments

Comments
 (0)