input: update all taproot script spends to optionally make the ctrl block

In this commit, we update all the taproot scripts spends to optionally
make the control block. This is useful in cases where we've already
created the control block, or may not have the items needed to construct
it in the first place.

We also add the control block to the sign descriptor itself.
This commit is contained in:
Olaoluwa Osuntokun
2023-03-01 21:34:56 -08:00
parent 405a435a84
commit 4c7da7df49
5 changed files with 354 additions and 92 deletions

View File

@@ -998,7 +998,7 @@ var witnessSizeTests = []witnessSizeTest{
}
witness, err := input.TaprootHtlcSpendSuccess(
signer, signDesc, revokeKey.PubKey(), testTx,
signer, signDesc, testTx, revokeKey.PubKey(),
scriptTree,
)
require.NoError(t, err)