mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-01 02:02:10 +02:00
lnwallet: for PsbtIntent return the internal key in the POutput
We also add a new assertion to the itests to ensure the field is being properly set.
This commit is contained in:
committed by
Oliver Gugger
parent
7144a1c733
commit
bed4562584
@@ -177,6 +177,17 @@ func runPsbtChanFunding(ht *lntest.HarnessTest, carol, dave *node.HarnessNode,
|
||||
},
|
||||
)
|
||||
|
||||
// If this is a taproot channel, then we'll decode the PSBT to assert
|
||||
// that an internal key is included.
|
||||
if commitType == lnrpc.CommitmentType_SIMPLE_TAPROOT {
|
||||
decodedPSBT, err := psbt.NewFromRawBytes(
|
||||
bytes.NewReader(tempPsbt), false,
|
||||
)
|
||||
require.NoError(ht, err)
|
||||
|
||||
require.Len(ht, decodedPSBT.Outputs[0].TaprootInternalKey, 32)
|
||||
}
|
||||
|
||||
// Let's add a second channel to the batch. This time between Carol and
|
||||
// Alice. We will publish the batch TX once this channel funding is
|
||||
// complete.
|
||||
|
Reference in New Issue
Block a user