@@ -331,6 +331,11 @@ func locateAssetTransfers(t *testing.T, tapdClient *tapClient,
331331
332332		transfer  =  forceCloseTransfer .Transfers [0 ]
333333
334+ 		if  transfer .AnchorTxBlockHash  ==  nil  {
335+ 			return  fmt .Errorf ("missing anchor block hash, "  + 
336+ 				"transfer not confirmed" )
337+ 		}
338+ 
334339		return  nil 
335340	}, defaultTimeout )
336341	require .NoError (t , err )
@@ -1083,8 +1088,8 @@ func createAssetHodlInvoice(t *testing.T, dstRfqPeer, dst *HarnessNode,
10831088
10841089	dstTapd  :=  newTapClient (t , dst )
10851090
1086- 	// As this is a hodl invoice, we'll also need to create a preimage external  
1087- 	// to lnd. 
1091+ 	// As this is a hodl invoice, we'll also need to create a preimage 
1092+ 	// external  to lnd. 
10881093	var  preimage  lntypes.Preimage 
10891094	_ , err  :=  rand .Read (preimage [:])
10901095	require .NoError (t , err )
@@ -1651,7 +1656,9 @@ func assertAssetBalance(t *testing.T, client *tapClient, assetID []byte,
16511656		t .Logf ("Failed to assert expected balance of %d, current " + 
16521657			"assets: %v" , expectedBalance , toProtoJSON (t , r ))
16531658
1654- 		utxos , err3  :=  client .ListUtxos (ctxb , & taprpc.ListUtxosRequest {})
1659+ 		utxos , err3  :=  client .ListUtxos (
1660+ 			ctxb , & taprpc.ListUtxosRequest {},
1661+ 		)
16551662		require .NoError (t , err3 )
16561663
16571664		t .Logf ("Current UTXOs: %v" , toProtoJSON (t , utxos ))
@@ -1697,8 +1704,8 @@ func assertSpendableBalance(t *testing.T, client *tapClient, assetID []byte,
16971704		}
16981705
16991706		if  assetSum  !=  expectedBalance  {
1700- 			return  fmt .Errorf ("expected balance %d, got %d" ,  expectedBalance , 
1701- 				assetSum )
1707+ 			return  fmt .Errorf ("expected balance %d, got %d" ,
1708+ 				expectedBalance ,  assetSum )
17021709		}
17031710
17041711		return  nil 
@@ -1710,7 +1717,9 @@ func assertSpendableBalance(t *testing.T, client *tapClient, assetID []byte,
17101717		t .Logf ("Failed to assert expected balance of %d, current " + 
17111718			"assets: %v" , expectedBalance , toProtoJSON (t , r ))
17121719
1713- 		utxos , err3  :=  client .ListUtxos (ctxb , & taprpc.ListUtxosRequest {})
1720+ 		utxos , err3  :=  client .ListUtxos (
1721+ 			ctxb , & taprpc.ListUtxosRequest {},
1722+ 		)
17141723		require .NoError (t , err3 )
17151724
17161725		t .Logf ("Current UTXOs: %v" , toProtoJSON (t , utxos ))
@@ -1887,7 +1896,9 @@ func assertNumHtlcs(t *testing.T, node *HarnessNode, expected int) {
18871896		}
18881897
18891898		if  numHtlcs  !=  expected  {
1890- 			return  fmt .Errorf ("expected %v HTLCs, got %v, %v" , expected , numHtlcs , spew .Sdump (toProtoJSON (t , listChansResp )))
1899+ 			return  fmt .Errorf ("expected %v HTLCs, got %v, %v" ,
1900+ 				expected , numHtlcs ,
1901+ 				spew .Sdump (toProtoJSON (t , listChansResp )))
18911902		}
18921903
18931904		return  nil 
0 commit comments