funding: use p2tr by default for batch_open_channel

In LND v0.15.1, batch_open_channel used p2tr by default
for change output. However, in a later version, a breaking
change has been fixed in FundPSBT to make the change type
configurable (default to p2wkh). As batch_open_channel
uses FundPsbt, we need to put back p2tr as default for
change output
This commit is contained in:
Torakushi committed 2023-04-17 17:37:51 +02:00
1 parent 66a85bf9db
commit 0445fef7ad
3 files changed
+32

No files matched your search

+14
View File
@@ -377,6 +377,20 @@ func (h *HarnessTest) AssertChannelExists(hn *node.HarnessNode,
return channel
}
// AssertOutputScriptClass checks that the specified transaction output has the
// expected script class.
func (h *HarnessTest) AssertOutputScriptClass(tx *btcutil.Tx,
outputIndex uint32, scriptClass txscript.ScriptClass) {
require.Greater(h, len(tx.MsgTx().TxOut), int(outputIndex))
txOut := tx.MsgTx().TxOut[outputIndex]
pkScript, err := txscript.ParsePkScript(txOut.PkScript)
require.NoError(h, err)
require.Equal(h, pkScript.Class(), scriptClass)
}
// findChannel tries to find a target channel in the node using the given
// channel point.
func (h *HarnessTest) findChannel(hn *node.HarnessNode,