mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-20 13:04:28 +02:00
itest: add coverage for disabling blinded forwards
This commit is contained in:
@@ -578,6 +578,10 @@ var allTestCases = []*lntest.TestCase{
|
|||||||
Name: "introduction blinded error",
|
Name: "introduction blinded error",
|
||||||
TestFunc: testIntroductionNodeError,
|
TestFunc: testIntroductionNodeError,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: "disable introduction node",
|
||||||
|
TestFunc: testDisableIntroductionNode,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Name: "removetx",
|
Name: "removetx",
|
||||||
TestFunc: testRemoveTx,
|
TestFunc: testRemoveTx,
|
||||||
|
@@ -925,3 +925,23 @@ func testIntroductionNodeError(ht *lntest.HarnessTest) {
|
|||||||
// Send the payment, but do not expect it to reach Carol at all.
|
// Send the payment, but do not expect it to reach Carol at all.
|
||||||
sendAndResumeBlindedPayment(ctx, ht, testCase, route, false)
|
sendAndResumeBlindedPayment(ctx, ht, testCase, route, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// testDisableIntroductionNode tests disabling of blinded forwards for the
|
||||||
|
// introduction node.
|
||||||
|
func testDisableIntroductionNode(ht *lntest.HarnessTest) {
|
||||||
|
// Disable route blinding for Bob, then re-connect to Alice.
|
||||||
|
ht.RestartNodeWithExtraArgs(ht.Bob, []string{
|
||||||
|
"--protocol.no-route-blinding",
|
||||||
|
})
|
||||||
|
ht.EnsureConnected(ht.Alice, ht.Bob)
|
||||||
|
|
||||||
|
ctx, testCase := newBlindedForwardTest(ht)
|
||||||
|
defer testCase.cleanup()
|
||||||
|
route := testCase.setup(ctx)
|
||||||
|
// We always expect failures to look like they originated at Bob
|
||||||
|
// because blinded errors are converted. However, our tests intercepts
|
||||||
|
// all of Carol's forwards and we're not providing it any interceptor
|
||||||
|
// instructions. This means that the test will hang/timeout at Carol
|
||||||
|
// if Bob _doesn't_ fail the HTLC back as expected.
|
||||||
|
sendAndResumeBlindedPayment(ctx, ht, testCase, route, false)
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user