itest: further reduce block mined in tests

This commit is contained in:
yyforyongyu committed 2024-12-20 19:38:12 +08:00
1 parent 6f2e7feb94
commit e79ad6e5aa
5 files changed
+30 -51

No files matched your search

+13 -23
View File
@@ -94,21 +94,17 @@ func testEstimateRouteFee(ht *lntest.HarnessTest) {
// added to the invoice always have enough liquidity, but here we check
// that the prober uses the more expensive route.
ht.EnsureConnected(mts.bob, paula)
channelPointBobPaula := ht.OpenChannel(
mts.bob, paula, lntest.OpenChannelParams{
Private: true,
Amt: 90_000,
PushAmt: 69_000,
},
)
ht.OpenChannel(mts.bob, paula, lntest.OpenChannelParams{
Private: true,
Amt: 90_000,
PushAmt: 69_000,
})
ht.EnsureConnected(mts.eve, paula)
channelPointEvePaula := ht.OpenChannel(
mts.eve, paula, lntest.OpenChannelParams{
Private: true,
Amt: 1_000_000,
},
)
ht.OpenChannel(mts.eve, paula, lntest.OpenChannelParams{
Private: true,
Amt: 1_000_000,
})
bobsPrivChannels := mts.bob.RPC.ListChannels(&lnrpc.ListChannelsRequest{
PrivateOnly: true,
@@ -243,6 +239,8 @@ func testEstimateRouteFee(ht *lntest.HarnessTest) {
locktime := initialBlockHeight + defaultTimelock +
int64(routing.BlockPadding)
noChanNode := ht.NewNode("ImWithoutChannels", nil)
var testCases = []*estimateRouteFeeTestCase{
// Single hop payment is free.
{
@@ -304,10 +302,8 @@ func testEstimateRouteFee(ht *lntest.HarnessTest) {
{
name: "single hop hint, destination " +
"without channels",
probing: true,
destination: ht.NewNode(
"ImWithoutChannels", nil,
),
probing: true,
destination: noChanNode,
routeHints: singleRouteHint,
expectedRoutingFeesMsat: feeACBP,
expectedCltvDelta: locktime + deltaACBP,
@@ -357,12 +353,6 @@ func testEstimateRouteFee(ht *lntest.HarnessTest) {
break
}
}
mts.ht.CloseChannelAssertPending(mts.bob, channelPointBobPaula, false)
mts.ht.CloseChannelAssertPending(mts.eve, channelPointEvePaula, false)
ht.MineBlocksAndAssertNumTxes(1, 2)
mts.closeChannels()
}
// runTestCase runs a single test case asserting that test conditions are met.