multi: fix inclusion proof size
The inclusion proof field in the TapscriptPartialReveal function was incorrect. An inclusion proof can be zero or more elements of 32-byte slices. So an empty inclusion proof can be valid too for a tree that only consists of a single leaf.
This commit is contained in:
3 files changed
+6
-4
No files matched your search
@@ -131,8 +131,9 @@ func testTaprootSignOutputRawScriptSpend(ctxt context.Context, t *harnessTest,
|
||||
// Let's add a second script output as well to test the partial reveal.
|
||||
leaf2 := testScriptSchnorrSig(t.t, leafSigningKey)
|
||||
|
||||
inclusionProof := leaf1.TapHash()
|
||||
tapscript := input.TapscriptPartialReveal(
|
||||
dummyInternalKey, leaf2, leaf1.TapHash(),
|
||||
dummyInternalKey, leaf2, inclusionProof[:],
|
||||
)
|
||||
taprootKey, err := tapscript.TaprootKey()
|
||||
require.NoError(t.t, err)
|
||||
|
||||
Reference in new issue
Block a user