Skip to content

Commit

Permalink
itest: use LND as sender
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Nov 21, 2024
1 parent 55c2b89 commit 9943d59
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion itest/bob_offline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func testFailureBobOffline(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)
p.lsp.LightningNode().Fund(10000000)
Expand Down
2 changes: 1 addition & 1 deletion itest/cltv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func testInvalidCltv(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)
p.lsp.LightningNode().Fund(10000000)
Expand Down
2 changes: 1 addition & 1 deletion itest/dynamic_fee_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func testDynamicFeeFlow(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)
p.lsp.LightningNode().Fund(10000000)
Expand Down
4 changes: 2 additions & 2 deletions itest/intercept_zero_conf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
var htlcInterceptorDelay = time.Second * 7

func testOpenZeroConfChannelOnReceive(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)
p.lsp.LightningNode().Fund(10000000)
Expand Down Expand Up @@ -66,7 +66,7 @@ func testOpenZeroConfChannelOnReceive(p *testParams) {
}

func testOpenZeroConfSingleHtlc(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)
p.lsp.LightningNode().Fund(10000000)
Expand Down
6 changes: 1 addition & 5 deletions itest/lntest/lnd_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,11 +472,7 @@ func (n *LndNode) WaitForChannelReady(channel *ChannelInfo) ShortChannelID {
if index >= 0 {
c := lc.Channels[index]
if c.Active {
if c.Private {
return NewShortChanIDFromInt(c.AliasScids[0])
} else {
return NewShortChanIDFromInt(c.ChanId)
}
return NewShortChanIDFromInt(c.ChanId)
}
} else {

Expand Down
2 changes: 1 addition & 1 deletion itest/lsps2_happy_flow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func testLsps2HappyFlow(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)
p.lsp.LightningNode().Fund(10000000)
Expand Down
2 changes: 1 addition & 1 deletion itest/lsps2_no_balance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func testLsps2NoBalance(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)

Expand Down
2 changes: 1 addition & 1 deletion itest/lsps2_zero_conf_utxo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func testLsps2ZeroConfUtxo(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)

Expand Down
2 changes: 1 addition & 1 deletion itest/no_balance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func testNoBalance(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)

Expand Down
6 changes: 3 additions & 3 deletions itest/notification_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

func testOfflineNotificationPaymentRegistered(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)
p.lsp.LightningNode().Fund(10000000)
Expand Down Expand Up @@ -91,7 +91,7 @@ func testOfflineNotificationPaymentRegistered(p *testParams) {
}

func testOfflineNotificationRegularForward(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)
p.lsp.LightningNode().Fund(10000000)
Expand Down Expand Up @@ -182,7 +182,7 @@ func testOfflineNotificationRegularForward(p *testParams) {
}

func testOfflineNotificationZeroConfChannel(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)
p.lsp.LightningNode().Fund(10000000)
Expand Down
2 changes: 1 addition & 1 deletion itest/probing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func testProbing(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)
p.lsp.LightningNode().Fund(10000000)
Expand Down
2 changes: 1 addition & 1 deletion itest/regular_forward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func testRegularForward(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)
p.lsp.LightningNode().Fund(10000000)
Expand Down
2 changes: 1 addition & 1 deletion itest/restart_lsp_node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func testRestartLspNode(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)
p.lsp.LightningNode().Fund(10000000)
Expand Down
2 changes: 1 addition & 1 deletion itest/zero_conf_utxo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func testOpenZeroConfUtxo(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)

Expand Down
2 changes: 1 addition & 1 deletion itest/zero_reserve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func testZeroReserve(p *testParams) {
alice := lntest.NewClnNode(p.h, p.m, "Alice")
alice := lntest.NewLndNode(p.h, p.m, "Alice")
alice.Start()
alice.Fund(10000000)
p.lsp.LightningNode().Fund(10000000)
Expand Down

0 comments on commit 9943d59

Please sign in to comment.