<!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->
<!-- Describe the issue -->
i made a taproot output with an internal key, a tapscript in a leaf and a nonexistent tapscript with a SHA256 of 32x 0x00 spending it doesnt work, but when i change the hash of the nonexistent tapscript to 31x 0x00 + 0x01 is does work. there is no reason why with 0 it wouldnt work as this theoretically is a valid SHA256 hash
Expected behavior
<!--- What behavior did you expect? -->
the transaction got accepted
Actual behavior
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
it got not
To reproduce
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
100% reliable with https://github.com/antonilol/btc_stuff/blob/461391d6ecbba98d361bca60b0e5f7d17349494a/p2tr_tapscript.ts
if you dont have time to make one yourself here is my TX: taproot output (this one is in the testnet blockchain eed3cb854b1faaf3a342d2738b356ba4c176cb0c96e06a378b7ee47d8d68a12f)
02000000000101eb9ed40b43fc676e2d33d6059338b75850611ea7ec7480a1cc030d7997cc7e730000000000feffffff021027000000000000225120c730e130570fb56367fb31d9ab9d492e38be719d31a0b4602fda344caa4b3d03fee468000000000016001494634ec1184c82d6a12b984f0e5efab9f6b053ec0247304402203ba26bbd89ddb641e19bab67773652ea09512ed7996a591d94d197109bf794ea0220375b5614eb4eb6a5f123aa5abce257f0273a9b70a9d87e6087378fc3fd452b68012102ca71026e93dc7183350a3c7af0c38ced30fea24dd230ccb2ffa365c55ec3e5da71762100
trying to spend:
02000000000101b294960b0f1c6d185882abab322dab58cba995b77fac80afc13b5595a0add7810000000000ffffffff017a2600000000000016001411b07a052ffdb815bb7eb017631b23d13eba5af904401a5f24e4d351e59eb64b213e5ce5dbe8e610eca7ea9128fd2f99bcc72eae122b6517a4a689122301dfa21f31c002cd3e55289be36be80bfd910e3f5649529f54401a5f24e4d351e59eb64b213e5ce5dbe8e610eca7ea9128fd2f99bcc72eae122b6517a4a689122301dfa21f31c002cd3e55289be36be80bfd910e3f5649529f54462042c68328c229ddef4f0588bd952e05eaca009bee43d01ff6bcbb0b681c15c894ac2042c68328c229ddef4f0588bd952e05eaca009bee43d01ff6bcbb0b681c15c894ba528741c15be1beaf62c286f2eae1b60ee1f1f6dcc9b96104ede0f09f1497c5bae82ea5aa000000000000000000000000000000000000000000000000000000000000000000000000
System information
What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)?
bitcoin.org binary v22
What type of machine are you observing the error on (OS/CPU and disk type)?
not needed, this is consensus related
<!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->
<!-- Any extra information that might be useful in the debugging process. -->
<!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->
