Skip to content

Commit

Permalink
itest: remove explicit hop hint inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Jun 17, 2024
1 parent d688f37 commit 7001ef4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 17 deletions.
5 changes: 0 additions & 5 deletions itest/lntest/cln_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,6 @@ func (n *ClnNode) CreateBolt11Invoice(options *CreateInvoiceOptions) *CreateInvo
label, err := GenerateRandomString()
CheckError(n.harness.T, err)

exposePrivateChannels := []string{}
if options.IncludeHopHints {
exposePrivateChannels = append(exposePrivateChannels, "true")
}
req := &rpc.InvoiceRequest{
Label: label,
AmountMsat: &rpc.AmountOrAny{
Expand All @@ -524,7 +520,6 @@ func (n *ClnNode) CreateBolt11Invoice(options *CreateInvoiceOptions) *CreateInvo
},
},
},
Exposeprivatechannels: exposePrivateChannels,
}

if options.Description != nil {
Expand Down
9 changes: 4 additions & 5 deletions itest/lntest/lightning_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ type OpenChannelOptions struct {
}

type CreateInvoiceOptions struct {
AmountMsat uint64
Description *string
Preimage *[]byte
Cltv *uint32
IncludeHopHints bool
AmountMsat uint64
Description *string
Preimage *[]byte
Cltv *uint32
}

type CreateInvoiceResult struct {
Expand Down
2 changes: 1 addition & 1 deletion itest/lntest/lnd_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ func (n *LndNode) WaitForChannelReady(channel *ChannelInfo) ShortChannelID {
func (n *LndNode) CreateBolt11Invoice(options *CreateInvoiceOptions) *CreateInvoiceResult {
req := &lnrpc.Invoice{
ValueMsat: int64(options.AmountMsat),
Private: options.IncludeHopHints,
Private: true,
}

if options.Description != nil {
Expand Down
6 changes: 2 additions & 4 deletions itest/notification_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ func testOfflineNotificationRegularForward(p *testParams) {
log.Printf("Adding bob's invoice")
amountMsat := uint64(2100000)
bobInvoice := p.BreezClient().Node().CreateBolt11Invoice(&lntest.CreateInvoiceOptions{
AmountMsat: amountMsat,
IncludeHopHints: true,
AmountMsat: amountMsat,
})
log.Printf(bobInvoice.Bolt11)

Expand Down Expand Up @@ -234,8 +233,7 @@ func testOfflineNotificationZeroConfChannel(p *testParams) {
amountMsat := uint64(2100000)

bobInvoice := p.BreezClient().Node().CreateBolt11Invoice(&lntest.CreateInvoiceOptions{
AmountMsat: amountMsat,
IncludeHopHints: true,
AmountMsat: amountMsat,
})

invoiceWithHint := bobInvoice.Bolt11
Expand Down
3 changes: 1 addition & 2 deletions itest/regular_forward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ func testRegularForward(p *testParams) {
log.Printf("Adding bob's invoice")
amountMsat := uint64(2100000)
bobInvoice := p.BreezClient().Node().CreateBolt11Invoice(&lntest.CreateInvoiceOptions{
AmountMsat: amountMsat,
IncludeHopHints: true,
AmountMsat: amountMsat,
})
log.Printf(bobInvoice.Bolt11)

Expand Down

0 comments on commit 7001ef4

Please sign in to comment.