routing/test: remove unused parameter in mission control test
This commit is contained in:
parent
64c7a0faa8
commit
2594abfba1
@ -103,8 +103,8 @@ func (ctx *mcTestContext) expectP(amt lnwire.MilliSatoshi, expected float64) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// reportFailure reports a failure by using a test route.
|
// reportFailure reports a failure by using a test route.
|
||||||
func (ctx *mcTestContext) reportFailure(t time.Time,
|
func (ctx *mcTestContext) reportFailure(amt lnwire.MilliSatoshi,
|
||||||
amt lnwire.MilliSatoshi, failure lnwire.FailureMessage) {
|
failure lnwire.FailureMessage) {
|
||||||
|
|
||||||
mcTestRoute.Hops[0].AmtToForward = amt
|
mcTestRoute.Hops[0].AmtToForward = amt
|
||||||
|
|
||||||
@ -127,10 +127,7 @@ func TestMissionControl(t *testing.T) {
|
|||||||
ctx.expectP(1000, 0.8)
|
ctx.expectP(1000, 0.8)
|
||||||
|
|
||||||
// Expect probability to be zero after reporting the edge as failed.
|
// Expect probability to be zero after reporting the edge as failed.
|
||||||
ctx.reportFailure(
|
ctx.reportFailure(1000, lnwire.NewTemporaryChannelFailure(nil))
|
||||||
testTime, 1000,
|
|
||||||
lnwire.NewTemporaryChannelFailure(nil),
|
|
||||||
)
|
|
||||||
ctx.expectP(1000, 0)
|
ctx.expectP(1000, 0)
|
||||||
|
|
||||||
// As we reported with a min penalization amt, a lower amt than reported
|
// As we reported with a min penalization amt, a lower amt than reported
|
||||||
@ -143,10 +140,7 @@ func TestMissionControl(t *testing.T) {
|
|||||||
|
|
||||||
// Edge fails again, this time without a min penalization amt. The edge
|
// Edge fails again, this time without a min penalization amt. The edge
|
||||||
// should be penalized regardless of amount.
|
// should be penalized regardless of amount.
|
||||||
ctx.reportFailure(
|
ctx.reportFailure(0, lnwire.NewTemporaryChannelFailure(nil))
|
||||||
ctx.now, 0,
|
|
||||||
lnwire.NewTemporaryChannelFailure(nil),
|
|
||||||
)
|
|
||||||
ctx.expectP(1000, 0)
|
ctx.expectP(1000, 0)
|
||||||
ctx.expectP(500, 0)
|
ctx.expectP(500, 0)
|
||||||
|
|
||||||
@ -160,10 +154,7 @@ func TestMissionControl(t *testing.T) {
|
|||||||
|
|
||||||
// A node level failure should bring probability of every channel back
|
// A node level failure should bring probability of every channel back
|
||||||
// to zero.
|
// to zero.
|
||||||
ctx.reportFailure(
|
ctx.reportFailure(0, lnwire.NewExpiryTooSoon(lnwire.ChannelUpdate{}))
|
||||||
ctx.now, 0,
|
|
||||||
lnwire.NewExpiryTooSoon(lnwire.ChannelUpdate{}),
|
|
||||||
)
|
|
||||||
ctx.expectP(1000, 0)
|
ctx.expectP(1000, 0)
|
||||||
|
|
||||||
// Check whether history snapshot looks sane.
|
// Check whether history snapshot looks sane.
|
||||||
@ -186,16 +177,14 @@ func TestMissionControlChannelUpdate(t *testing.T) {
|
|||||||
// Report a policy related failure. Because it is the first, we don't
|
// Report a policy related failure. Because it is the first, we don't
|
||||||
// expect a penalty.
|
// expect a penalty.
|
||||||
ctx.reportFailure(
|
ctx.reportFailure(
|
||||||
ctx.now, 0,
|
0, lnwire.NewFeeInsufficient(0, lnwire.ChannelUpdate{}),
|
||||||
lnwire.NewFeeInsufficient(0, lnwire.ChannelUpdate{}),
|
|
||||||
)
|
)
|
||||||
ctx.expectP(0, 0.8)
|
ctx.expectP(0, 0.8)
|
||||||
|
|
||||||
// Report another failure for the same channel. We expect it to be
|
// Report another failure for the same channel. We expect it to be
|
||||||
// pruned.
|
// pruned.
|
||||||
ctx.reportFailure(
|
ctx.reportFailure(
|
||||||
ctx.now, 0,
|
0, lnwire.NewFeeInsufficient(0, lnwire.ChannelUpdate{}),
|
||||||
lnwire.NewFeeInsufficient(0, lnwire.ChannelUpdate{}),
|
|
||||||
)
|
)
|
||||||
ctx.expectP(0, 0)
|
ctx.expectP(0, 0)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user