Skip to content

Commit

Permalink
itest: test channel.backup changes upon shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
starius committed Oct 2, 2024
1 parent 36ebcd5 commit ed7ce3f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions itest/lnd_channel_backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -786,8 +786,15 @@ func runChanRestoreScenarioForceClose(ht *lntest.HarnessTest, zeroConf bool) {
ht.AssertNumTxsInMempool(1)

// Now that we're able to make our restored now, we'll shutdown the old
// Dave node as we'll be storing it shortly below.
ht.Shutdown(dave)
// Dave node as we'll be storing it shortly below. Use SuspendNode, not
// Shutdown to keep its directory including channel.backup file.
ht.SuspendNode(dave)

// Read Dave's channel.backup file again to make sure it was updated
// upon Dave's shutdown.
multi2, err := os.ReadFile(backupFilePath)
require.NoError(ht, err)
require.NotEqual(ht, multi, multi2)

// Mine a block to confirm the closing tx from Dave.
ht.MineBlocksAndAssertNumTxes(1, 1)
Expand Down

0 comments on commit ed7ce3f

Please sign in to comment.