routing/test: fix outgoing restriction test

Previously both paths were equal cost, so it could also be a
coincedence that the path with the outgoing restriction would be chosen.
This commit is contained in:
Joost Jager 2019-11-18 11:34:47 +01:00
parent 5fde7977f4
commit 0f6af2ed54
No known key found for this signature in database
GPG Key ID: A61B9D4C393C59C7

@ -1821,30 +1821,22 @@ func TestRestrictOutgoingChannel(t *testing.T) {
// target. The path through channel 2 is the highest cost path. // target. The path through channel 2 is the highest cost path.
testChannels := []*testChannel{ testChannels := []*testChannel{
symmetricTestChannel("roasbeef", "a", 100000, &testChannelPolicy{ symmetricTestChannel("roasbeef", "a", 100000, &testChannelPolicy{
Expiry: 144, Expiry: 144,
FeeRate: 400,
MinHTLC: 1,
}, 1), }, 1),
symmetricTestChannel("a", "target", 100000, &testChannelPolicy{ symmetricTestChannel("a", "target", 100000, &testChannelPolicy{
Expiry: 144, Expiry: 144,
FeeRate: 400, FeeRate: 400,
MinHTLC: 1, }, 4),
}),
symmetricTestChannel("roasbeef", "b", 100000, &testChannelPolicy{ symmetricTestChannel("roasbeef", "b", 100000, &testChannelPolicy{
Expiry: 144, Expiry: 144,
FeeRate: 800,
MinHTLC: 1,
}, 2), }, 2),
symmetricTestChannel("roasbeef", "b", 100000, &testChannelPolicy{ symmetricTestChannel("roasbeef", "b", 100000, &testChannelPolicy{
Expiry: 144, Expiry: 144,
FeeRate: 600,
MinHTLC: 1,
}, 3), }, 3),
symmetricTestChannel("b", "target", 100000, &testChannelPolicy{ symmetricTestChannel("b", "target", 100000, &testChannelPolicy{
Expiry: 144, Expiry: 144,
FeeRate: 400, FeeRate: 800,
MinHTLC: 1, }, 5),
}),
} }
ctx := newPathFindingTestContext(t, testChannels, "roasbeef") ctx := newPathFindingTestContext(t, testChannels, "roasbeef")