@@ -432,6 +432,8 @@ func testGetRecoveryInfo(miner *rpctest.Harness,
432
432
func testDualFundingReservationWorkflow (miner * rpctest.Harness ,
433
433
alice , bob * lnwallet.LightningWallet , t * testing.T ) {
434
434
435
+ t .Skipf ("dual funding isn't exposed on the p2p layer" )
436
+
435
437
fundingAmount , err := btcutil .NewAmount (5 )
436
438
require .NoError (t , err , "unable to create amt" )
437
439
@@ -2196,9 +2198,9 @@ func testChangeOutputSpendConfirmation(r *rpctest.Harness,
2196
2198
// TODO(wilmer): replace this once SendOutputs easily supports sending
2197
2199
// all funds in one transaction.
2198
2200
txFeeRate := chainfee .SatPerKWeight (2500 )
2199
- txFee := btcutil . Amount ( 14380 )
2201
+ const txFee = int64 ( 14500 )
2200
2202
output := & wire.TxOut {
2201
- Value : int64 (aliceBalance - txFee ) ,
2203
+ Value : int64 (aliceBalance ) - txFee ,
2202
2204
PkScript : bobPkScript ,
2203
2205
}
2204
2206
tx := sendCoins (t , r , alice , bob , output , txFeeRate , true , 1 )
@@ -2564,7 +2566,9 @@ func testCreateSimpleTx(r *rpctest.Harness, w *lnwallet.LightningWallet,
2564
2566
// _very_ similar to the one we just created being sent. The
2565
2567
// only difference is that the dry run tx is not signed, and
2566
2568
// that the change output position might be different.
2567
- tx , sendErr := w .SendOutputs (outputs , feeRate , minConfs , labels .External )
2569
+ tx , sendErr := w .SendOutputs (
2570
+ outputs , feeRate , minConfs , labels .External ,
2571
+ )
2568
2572
switch {
2569
2573
case test .valid && sendErr != nil :
2570
2574
t .Fatalf ("got unexpected error when sending tx: %v" ,
@@ -2649,6 +2653,16 @@ func testCreateSimpleTx(r *rpctest.Harness, w *lnwallet.LightningWallet,
2649
2653
if err := assertSimilarTx (createTx .Tx , tx ); err != nil {
2650
2654
t .Fatalf ("transactions not similar: %v" , err )
2651
2655
}
2656
+
2657
+ // Now that we know both transactions were essentially
2658
+ // identical, we'll make sure that a P2TR addr was used as the
2659
+ // change output, which is the current default.
2660
+ changeTxOut := createTx .Tx .TxOut [createTx .ChangeIndex ]
2661
+ changeScriptType , _ , _ , err := txscript .ExtractPkScriptAddrs (
2662
+ changeTxOut .PkScript , & w .Cfg .NetParams ,
2663
+ )
2664
+ require .NoError (t , err )
2665
+ require .Equal (t , changeScriptType , txscript .WitnessV1TaprootTy )
2652
2666
}
2653
2667
}
2654
2668
0 commit comments