itest: add missing topology check in tests

This commit adds the missing topology checks.
This commit is contained in:
yyforyongyu 2022-11-14 21:35:08 +08:00
parent d97f52d12a
commit 8288d3da8e
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868
3 changed files with 15 additions and 1 deletions

View File

@ -106,6 +106,7 @@ func testForwardInterceptorDedupHtlc(ht *lntest.HarnessTest) {
ht.EnsureConnected(bob, alice)
// Here we wait for the channel to be active again.
ht.AssertChannelExists(alice, cpAB)
ht.AssertChannelExists(bob, cpAB)
// Now that the channel is active we make sure the test passes as
@ -296,7 +297,8 @@ func testForwardInterceptorBasic(ht *lntest.HarnessTest) {
restartAlice := ht.SuspendNode(alice)
require.NoError(ht, restartAlice(), "failed to restart alice")
// Make sure the channel is active from Bob's PoV.
// Make sure the channel is active from both Alice and Bob's PoV.
ht.AssertChannelExists(alice, cpAB)
ht.AssertChannelExists(bob, cpAB)
// Create a new interceptor as the old one has quit.

View File

@ -223,6 +223,9 @@ func testRevokedCloseRetributionZeroValueRemoteOutput(ht *lntest.HarnessTest) {
// backup.
ht.EnsureConnected(dave, carol)
// Once connected, give Dave some time to enable the channel again.
ht.AssertTopologyChannelOpen(dave, chanPoint)
// Finally, send payments from Dave to Carol, consuming Carol's
// remaining payment hashes.
ht.CompletePaymentRequestsNoWait(dave, carolPayReqs, chanPoint)
@ -400,6 +403,9 @@ func testRevokedCloseRetributionRemoteHodl(ht *lntest.HarnessTest) {
// backup.
ht.EnsureConnected(dave, carol)
// Once connected, give Dave some time to enable the channel again.
ht.AssertTopologyChannelOpen(dave, chanPoint)
// Finally, send payments from Dave to Carol, consuming Carol's
// remaining payment hashes.
ht.CompletePaymentRequestsNoWait(
@ -726,6 +732,9 @@ func testRevokedCloseRetributionAltruistWatchtowerCase(ht *lntest.HarnessTest,
// backup.
ht.EnsureConnected(dave, carol)
// Once connected, give Dave some time to enable the channel again.
ht.AssertTopologyChannelOpen(dave, chanPoint)
// Finally, send payments from Dave to Carol, consuming Carol's
// remaining payment hashes.
ht.CompletePaymentRequestsNoWait(dave, carolPayReqs, chanPoint)

View File

@ -341,6 +341,9 @@ func runMultiHopSendToRoute(ht *lntest.HarnessTest, useGraphCache bool) {
)
defer ht.CloseChannel(carol, chanPointBob)
// Make sure Alice knows the channel between Bob and Carol.
ht.AssertTopologyChannelOpen(alice, chanPointBob)
// Create 5 invoices for Carol, which expect a payment from Alice for
// 1k satoshis with a different preimage each time.
const (