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:
Olaoluwa Osuntokun
2024-04-16 16:25:57 -07:00
committed by Oliver Gugger
parent 7144a1c733
commit bed4562584
2 changed files with 25 additions and 1 deletions

View File

@@ -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.