@@ -172,7 +172,7 @@ func testSweepCPFPAnchorOutgoingTimeout(ht *lntest.HarnessTest) {
172172
173173 // Remember the force close height so we can calculate the deadline
174174 // height.
175- _ , forceCloseHeight := ht .GetBestBlock ()
175+ forceCloseHeight := ht .CurrentHeight ()
176176
177177 // Bob should have two pending sweeps,
178178 // - anchor sweeping from his local commitment.
@@ -188,7 +188,7 @@ func testSweepCPFPAnchorOutgoingTimeout(ht *lntest.HarnessTest) {
188188 sweeps := ht .AssertNumPendingSweeps (bob , 2 )
189189
190190 // The two anchor sweeping should have the same deadline height.
191- deadlineHeight := uint32 ( forceCloseHeight ) + deadlineDeltaAnchor
191+ deadlineHeight := forceCloseHeight + deadlineDeltaAnchor
192192 require .Equal (ht , deadlineHeight , sweeps [0 ].DeadlineHeight )
193193 require .Equal (ht , deadlineHeight , sweeps [1 ].DeadlineHeight )
194194
@@ -304,7 +304,7 @@ func testSweepCPFPAnchorOutgoingTimeout(ht *lntest.HarnessTest) {
304304 //
305305 // Once out of the above loop, we expect to be 2 blocks before the CPFP
306306 // deadline.
307- _ , currentHeight := ht .GetBestBlock ()
307+ currentHeight := ht .CurrentHeight ()
308308 require .Equal (ht , int (anchorDeadline - 2 ), int (currentHeight ))
309309
310310 // Mine one more block, we'd use up all the CPFP budget.
@@ -512,8 +512,8 @@ func testSweepCPFPAnchorIncomingTimeout(ht *lntest.HarnessTest) {
512512 forceCloseHeight := htlc .ExpirationHeight - goToChainDelta
513513
514514 // Mine till the goToChainHeight is reached.
515- _ , currentHeight := ht .GetBestBlock ()
516- numBlocks := forceCloseHeight - uint32 ( currentHeight )
515+ currentHeight := ht .CurrentHeight ()
516+ numBlocks := forceCloseHeight - currentHeight
517517 ht .MineEmptyBlocks (int (numBlocks ))
518518
519519 // Assert Bob's force closing tx has been broadcast.
@@ -641,7 +641,7 @@ func testSweepCPFPAnchorIncomingTimeout(ht *lntest.HarnessTest) {
641641 //
642642 // Once out of the above loop, we expect to be 2 blocks before the CPFP
643643 // deadline.
644- _ , currentHeight = ht .GetBestBlock ()
644+ currentHeight = ht .CurrentHeight ()
645645 require .Equal (ht , int (anchorDeadline - 2 ), int (currentHeight ))
646646
647647 // Mine one more block, we'd use up all the CPFP budget.
@@ -1380,7 +1380,7 @@ func testSweepCommitOutputAndAnchor(ht *lntest.HarnessTest) {
13801380 //
13811381 // TODO(yy): assert they are equal once blocks are synced via
13821382 // `blockbeat`.
1383- _ , currentHeight := ht .GetBestBlock ( )
1383+ currentHeight := int32 ( ht .CurrentHeight () )
13841384 actualDeadline := int32 (pendingSweepBob .DeadlineHeight ) - currentHeight
13851385 if actualDeadline != int32 (deadlineB ) {
13861386 ht .Logf ("!!! Found unsynced block between sweeper and " +
@@ -1438,7 +1438,7 @@ func testSweepCommitOutputAndAnchor(ht *lntest.HarnessTest) {
14381438 //
14391439 // TODO(yy): assert they are equal once blocks are synced via
14401440 // `blockbeat`.
1441- _ , currentHeight = ht .GetBestBlock ( )
1441+ currentHeight = int32 ( ht .CurrentHeight () )
14421442 actualDeadline = int32 (aliceCommit .DeadlineHeight ) - currentHeight
14431443 if actualDeadline != int32 (deadlineA ) {
14441444 ht .Logf ("!!! Found unsynced block between Alice's sweeper and " +
@@ -1972,7 +1972,7 @@ func runBumpFee(ht *lntest.HarnessTest, alice *node.HarnessNode) {
19721972
19731973 // Since the request doesn't specify a deadline, we expect the default
19741974 // deadline to be used.
1975- _ , currentHeight := ht .GetBestBlock ( )
1975+ currentHeight := int32 ( ht .CurrentHeight () )
19761976 deadline := uint32 (currentHeight + sweep .DefaultDeadlineDelta )
19771977
19781978 // Assert the pending sweep is created with the expected values:
0 commit comments