mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-01 02:02:10 +02:00
routing: add test case for result interpretation of Channel Disabled failure
This commit is contained in:
@@ -349,6 +349,23 @@ var resultTestCases = []resultTestCase{
|
|||||||
nodeFailure: nil,
|
nodeFailure: nil,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Test a channel disabled failure from the final hop in two hops. Only the
|
||||||
|
// disabled channel should be penalized for any amount.
|
||||||
|
{
|
||||||
|
name: "two hop channel disabled",
|
||||||
|
route: &routeTwoHop,
|
||||||
|
failureSrcIdx: 1,
|
||||||
|
failure: &lnwire.FailChannelDisabled{},
|
||||||
|
|
||||||
|
expectedResult: &interpretedResult{
|
||||||
|
pairResults: map[DirectedNodePair]pairResult{
|
||||||
|
getTestPair(1, 2): failPairResult(0),
|
||||||
|
getTestPair(2, 1): failPairResult(0),
|
||||||
|
},
|
||||||
|
policyFailure: getPolicyFailure(1, 2),
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestResultInterpretation executes a list of test cases that test the result
|
// TestResultInterpretation executes a list of test cases that test the result
|
||||||
|
Reference in New Issue
Block a user