Skip to content

Commit d57c6fa

Browse files
committed
itest: add coverage for disabling blinded forwards
1 parent 428a33f commit d57c6fa

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

itest/list_on_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,10 @@ var allTestCases = []*lntest.TestCase{
578578
Name: "introduction blinded error",
579579
TestFunc: testIntroductionNodeError,
580580
},
581+
{
582+
Name: "disable introduction node",
583+
TestFunc: testDisableIntroductionNode,
584+
},
581585
{
582586
Name: "removetx",
583587
TestFunc: testRemoveTx,

itest/lnd_route_blinding_test.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,3 +925,23 @@ func testIntroductionNodeError(ht *lntest.HarnessTest) {
925925
// Send the payment, but do not expect it to reach Carol at all.
926926
sendAndResumeBlindedPayment(ctx, ht, testCase, route, false)
927927
}
928+
929+
// testDisableIntroductionNode tests disabling of blinded forwards for the
930+
// introduction node.
931+
func testDisableIntroductionNode(ht *lntest.HarnessTest) {
932+
// Disable route blinding for Bob, then re-connect to Alice.
933+
ht.RestartNodeWithExtraArgs(ht.Bob, []string{
934+
"--protocol.no-route-blinding",
935+
})
936+
ht.EnsureConnected(ht.Alice, ht.Bob)
937+
938+
ctx, testCase := newBlindedForwardTest(ht)
939+
defer testCase.cleanup()
940+
route := testCase.setup(ctx)
941+
// We always expect failures to look like they originated at Bob
942+
// because blinded errors are converted. However, our tests intercepts
943+
// all of Carol's forwards and we're not providing it any interceptor
944+
// instructions. This means that the test will hang/timeout at Carol
945+
// if Bob _doesn't_ fail the HTLC back as expected.
946+
sendAndResumeBlindedPayment(ctx, ht, testCase, route, false)
947+
}

0 commit comments

Comments
 (0)