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
@@ -273,8 +273,9 @@ func TestScriptImport(t *testing.T) {
|
||||
// Now, as a last test, make sure that when we try adding an address
|
||||
// with partial script reveal, we get an error that the address already
|
||||
// exists.
|
||||
inclusionProof := leaf2.TapHash()
|
||||
tapscript2 := input.TapscriptPartialReveal(
|
||||
testPubKey, leaf1, leaf2.TapHash(),
|
||||
testPubKey, leaf1, inclusionProof[:],
|
||||
)
|
||||
_, err = w.ImportTaprootScript(scope, tapscript2)
|
||||
require.Error(t, err)
|
||||
|
||||
Reference in new issue
Block a user