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

@@ -25,7 +25,7 @@ func testUpdateChannelPolicy(ht *lntemp.HarnessTest) {
defaultTimeLockDelta = chainreg.DefaultBitcoinTimeLockDelta
defaultMinHtlc = 1000
)
defaultMaxHtlc := calculateMaxHtlc(funding.MaxBtcFundingAmount)
defaultMaxHtlc := lntemp.CalculateMaxHtlc(funding.MaxBtcFundingAmount)
chanAmt := funding.MaxBtcFundingAmount
pushAmt := chanAmt / 2
@@ -513,7 +513,7 @@ func testSendUpdateDisableChannel(ht *lntemp.HarnessTest) {
FeeRateMilliMsat: int64(chainreg.DefaultBitcoinFeeRate),
TimeLockDelta: chainreg.DefaultBitcoinTimeLockDelta,
MinHtlc: 1000, // default value
MaxHtlcMsat: calculateMaxHtlc(chanAmt),
MaxHtlcMsat: lntemp.CalculateMaxHtlc(chanAmt),
Disabled: true,
}