itest+lntemp: move calculation functions into lntemp

Functions that can be useful to other tests are now moved into the
package `lntemp`.
This commit is contained in:
yyforyongyu
2022-08-12 16:02:32 +08:00
parent 4a9c3449a6
commit ee0790493c
12 changed files with 95 additions and 96 deletions

View File

@@ -541,7 +541,7 @@ func testPrivateUpdateAlias(ht *lntemp.HarnessTest,
FeeRateMilliMsat: testFeeBase * feeRate,
TimeLockDelta: timeLockDelta,
MinHtlc: 1000, // default value
MaxHtlcMsat: calculateMaxHtlc(chanAmt),
MaxHtlcMsat: lntemp.CalculateMaxHtlc(chanAmt),
}
// Assert that Dave receives Carol's policy update.
@@ -567,7 +567,7 @@ func testPrivateUpdateAlias(ht *lntemp.HarnessTest,
FeeRateMilliMsat: testFeeBase * feeRate,
TimeLockDelta: timeLockDelta,
MinHtlc: 1000,
MaxHtlcMsat: calculateMaxHtlc(chanAmt),
MaxHtlcMsat: lntemp.CalculateMaxHtlc(chanAmt),
}
// Assert that Carol receives Dave's policy update.
@@ -654,7 +654,7 @@ func testPrivateUpdateAlias(ht *lntemp.HarnessTest,
FeeRateMilliMsat: testFeeBase * feeRate,
TimeLockDelta: timeLockDelta,
MinHtlc: 1000,
MaxHtlcMsat: calculateMaxHtlc(chanAmt),
MaxHtlcMsat: lntemp.CalculateMaxHtlc(chanAmt),
}
// Assert Dave receives Carol's policy update.
@@ -743,7 +743,7 @@ func testPrivateUpdateAlias(ht *lntemp.HarnessTest,
FeeRateMilliMsat: testFeeBase * feeRate,
TimeLockDelta: timeLockDelta,
MinHtlc: 1000,
MaxHtlcMsat: calculateMaxHtlc(chanAmt),
MaxHtlcMsat: lntemp.CalculateMaxHtlc(chanAmt),
}
// Assert Dave and optionally Eve receives Carol's update.