From 7bf83b13a8b40d426fc89b097df7d4de157e63a8 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 10 Aug 2022 18:33:19 -0700 Subject: [PATCH] lnwallet: use P2TR addresses for change outputs for funding coin select --- lnwallet/test/test_interface.go | 12 ++++++++---- lnwallet/wallet.go | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lnwallet/test/test_interface.go b/lnwallet/test/test_interface.go index dd741fd4c..ebaf91e8d 100644 --- a/lnwallet/test/test_interface.go +++ b/lnwallet/test/test_interface.go @@ -2708,6 +2708,14 @@ var walletTests = []walletTestCase{ name: "change output spend confirmation", test: testChangeOutputSpendConfirmation, }, + { + // TODO(guggero): this test should remain second until dual + // funding can properly exchange full UTXO information and we + // can use P2TR change outputs as the funding inputs for a dual + // funded channel. + name: "dual funder workflow", + test: testDualFundingReservationWorkflow, + }, { name: "spend unconfirmed outputs", test: testSpendUnconfirmed, @@ -2744,10 +2752,6 @@ var walletTests = []walletTestCase{ name: "single funding workflow external funding tx", test: testSingleFunderExternalFundingTx, }, - { - name: "dual funder workflow", - test: testDualFundingReservationWorkflow, - }, { name: "output locking", test: testFundingTransactionLockedOutputs, diff --git a/lnwallet/wallet.go b/lnwallet/wallet.go index 8ee8cabc6..49c6410be 100644 --- a/lnwallet/wallet.go +++ b/lnwallet/wallet.go @@ -775,7 +775,7 @@ func (l *LightningWallet) handleFundingReserveRequest(req *InitFundingReserveMsg FeeRate: req.FundingFeePerKw, ChangeAddr: func() (btcutil.Address, error) { return l.NewAddress( - WitnessPubKey, true, DefaultAccountName, + TaprootPubkey, true, DefaultAccountName, ) }, }