@@ -94,7 +94,7 @@ func newChanRestoreScenario(ht *lntest.HarnessTest, ct lnrpc.CommitmentType,
9494 ht .FundCoinsUnconfirmed (btcutil .SatoshiPerBitcoin , dave )
9595
9696 // Mine a block to confirm the funds.
97- ht .MineBlocks ( 1 )
97+ ht .MineBlocksAndAssertNumTxes ( 1 , 2 )
9898
9999 // For the anchor output case we need two UTXOs for Carol so she can
100100 // sweep both the local and remote anchor.
@@ -267,7 +267,7 @@ func testChannelBackupRestoreBasic(ht *lntest.HarnessTest) {
267267 // the node from seed, then manually recover
268268 // the channel backup.
269269 return chanRestoreViaRPC (
270- st , password , mnemonic , multi , oldNode ,
270+ st , password , mnemonic , multi ,
271271 )
272272 },
273273 },
@@ -291,7 +291,7 @@ func testChannelBackupRestoreBasic(ht *lntest.HarnessTest) {
291291 // create a new nodeRestorer that will restore
292292 // using the on-disk channel.backup.
293293 return chanRestoreViaRPC (
294- st , password , mnemonic , multi , oldNode ,
294+ st , password , mnemonic , multi ,
295295 )
296296 },
297297 },
@@ -523,7 +523,7 @@ func runChanRestoreScenarioUnConfirmed(ht *lntest.HarnessTest, useFile bool) {
523523 // In our nodeRestorer function, we'll restore the node from seed, then
524524 // manually recover the channel backup.
525525 restoredNodeFunc := chanRestoreViaRPC (
526- ht , crs .password , crs .mnemonic , multi , dave ,
526+ ht , crs .password , crs .mnemonic , multi ,
527527 )
528528
529529 // Test the scenario.
@@ -624,8 +624,8 @@ func runChanRestoreScenarioCommitTypes(ht *lntest.HarnessTest,
624624
625625 var fundingShim * lnrpc.FundingShim
626626 if ct == lnrpc .CommitmentType_SCRIPT_ENFORCED_LEASE {
627- _ , minerHeight := ht .Miner . GetBestBlock ()
628- thawHeight := uint32 ( minerHeight + thawHeightDelta )
627+ minerHeight := ht .CurrentHeight ()
628+ thawHeight := minerHeight + thawHeightDelta
629629
630630 fundingShim , _ = deriveFundingShim (
631631 ht , dave , carol , crs .params .Amt , thawHeight , true , ct ,
@@ -658,7 +658,7 @@ func runChanRestoreScenarioCommitTypes(ht *lntest.HarnessTest,
658658 // Now that we have Dave's backup file, we'll create a new nodeRestorer
659659 // that we'll restore using the on-disk channels.backup.
660660 restoredNodeFunc := chanRestoreViaRPC (
661- ht , crs .password , crs .mnemonic , multi , dave ,
661+ ht , crs .password , crs .mnemonic , multi ,
662662 )
663663
664664 // Test the scenario.
@@ -687,7 +687,7 @@ func testChannelBackupRestoreLegacy(ht *lntest.HarnessTest) {
687687 // In our nodeRestorer function, we'll restore the node from seed, then
688688 // manually recover the channel backup.
689689 restoredNodeFunc := chanRestoreViaRPC (
690- ht , crs .password , crs .mnemonic , multi , dave ,
690+ ht , crs .password , crs .mnemonic , multi ,
691691 )
692692
693693 // Test the scenario.
@@ -779,11 +779,11 @@ func runChanRestoreScenarioForceClose(ht *lntest.HarnessTest, zeroConf bool) {
779779 // Now that we have Dave's backup file, we'll create a new nodeRestorer
780780 // that will restore using the on-disk channel.backup.
781781 restoredNodeFunc := chanRestoreViaRPC (
782- ht , crs .password , crs .mnemonic , multi , dave ,
782+ ht , crs .password , crs .mnemonic , multi ,
783783 )
784784
785785 // We now wait until both Dave's closing tx.
786- ht .Miner . AssertNumTxsInMempool (1 )
786+ ht .AssertNumTxsInMempool (1 )
787787
788788 // Now that we're able to make our restored now, we'll shutdown the old
789789 // Dave node as we'll be storing it shortly below.
@@ -1272,7 +1272,7 @@ func testDataLossProtection(ht *lntest.HarnessTest) {
12721272 ht .MineBlocks (1 )
12731273
12741274 // Dave should sweep his funds.
1275- ht .Miner . AssertNumTxsInMempool (1 )
1275+ ht .AssertNumTxsInMempool (1 )
12761276
12771277 // Mine a block to confirm the sweep, and make sure Dave got his
12781278 // balance back.
@@ -1388,8 +1388,7 @@ func createLegacyRevocationChannel(ht *lntest.HarnessTest,
13881388// instance which will restore the target node from a password+seed, then
13891389// trigger a SCB restore using the RPC interface.
13901390func chanRestoreViaRPC (ht * lntest.HarnessTest , password []byte ,
1391- mnemonic []string , multi []byte ,
1392- oldNode * node.HarnessNode ) nodeRestorer {
1391+ mnemonic []string , multi []byte ) nodeRestorer {
13931392
13941393 backup := & lnrpc.RestoreChanBackupRequest_MultiChanBackup {
13951394 MultiChanBackup : multi ,
@@ -1428,7 +1427,7 @@ func assertTimeLockSwept(ht *lntest.HarnessTest, carol, dave *node.HarnessNode,
14281427
14291428 // Mine a block to trigger the sweeps.
14301429 ht .MineBlocks (1 )
1431- ht .Miner . AssertNumTxsInMempool (expectedTxes )
1430+ ht .AssertNumTxsInMempool (expectedTxes )
14321431
14331432 // Carol should consider the channel pending force close (since she is
14341433 // waiting for her sweep to confirm).
@@ -1462,9 +1461,9 @@ func assertTimeLockSwept(ht *lntest.HarnessTest, carol, dave *node.HarnessNode,
14621461
14631462 // Mine a block to trigger the sweeps.
14641463 ht .MineEmptyBlocks (1 )
1465- daveSweep := ht .Miner . AssertNumTxsInMempool (1 )[0 ]
1464+ daveSweep := ht .AssertNumTxsInMempool (1 )[0 ]
14661465 block := ht .MineBlocksAndAssertNumTxes (1 , 1 )[0 ]
1467- ht .Miner . AssertTxInBlock (block , daveSweep )
1466+ ht .AssertTxInBlock (block , daveSweep )
14681467
14691468 // Now the channel should be fully closed also from Dave's POV.
14701469 ht .AssertNumPendingForceClose (dave , 0 )
@@ -1510,7 +1509,7 @@ func assertDLPExecuted(ht *lntest.HarnessTest,
15101509
15111510 // Upon reconnection, the nodes should detect that Dave is out of sync.
15121511 // Carol should force close the channel using her latest commitment.
1513- ht .Miner . AssertNumTxsInMempool (1 )
1512+ ht .AssertNumTxsInMempool (1 )
15141513
15151514 // Channel should be in the state "waiting close" for Carol since she
15161515 // broadcasted the force close tx.
0 commit comments