mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-13 22:49:05 +02:00
itest: fix channel backup subscription test
With one more notification event being dispatched in the local force close case we need to update one of the integration tests to account for the additional message.
This commit is contained in:
parent
06a693f10e
commit
294fba0bc5
@ -578,15 +578,28 @@ func testChannelBackupUpdates(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
ctxt, t, net, net.Alice, chanPoint, forceClose,
|
||||
)
|
||||
|
||||
// We should get a single notification after closing, and the
|
||||
// on-disk state should match this latest notifications.
|
||||
assertBackupNtfns(1)
|
||||
assertBackupFileState()
|
||||
|
||||
// If we force closed the channel, then we'll mine enough
|
||||
// blocks to ensure all outputs have been swept.
|
||||
if forceClose {
|
||||
// A local force closed channel will trigger a
|
||||
// notification once the commitment TX confirms on
|
||||
// chain. But that won't remove the channel from the
|
||||
// backup just yet, that will only happen once the time
|
||||
// locked contract was fully resolved on chain.
|
||||
assertBackupNtfns(1)
|
||||
|
||||
cleanupForceClose(t, net, net.Alice, chanPoint)
|
||||
|
||||
// Now that the channel's been fully resolved, we expect
|
||||
// another notification.
|
||||
assertBackupNtfns(1)
|
||||
assertBackupFileState()
|
||||
} else {
|
||||
// We should get a single notification after closing,
|
||||
// and the on-disk state should match this latest
|
||||
// notifications.
|
||||
assertBackupNtfns(1)
|
||||
assertBackupFileState()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user