mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 01:36:24 +01:00
routing: add test case for result interpretation of Channel Disabled failure
This commit is contained in:
parent
78ce3abee5
commit
100abb4a30
1 changed files with 17 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue