mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-07 22:24:34 +01:00
Do not use CScript for tapleaf scripts until the tapleaf version is known
Prevents use of CScript methods until the tapleaf is known to be a tapscript.
This commit is contained in:
@@ -1643,7 +1643,7 @@ std::unique_ptr<DescriptorImpl> InferScript(const CScript& script, ParseScriptCo
|
||||
for (const auto& [depth, script, leaf_ver] : *tree) {
|
||||
std::unique_ptr<DescriptorImpl> subdesc;
|
||||
if (leaf_ver == TAPROOT_LEAF_TAPSCRIPT) {
|
||||
subdesc = InferScript(script, ParseScriptContext::P2TR, provider);
|
||||
subdesc = InferScript(CScript(script.begin(), script.end()), ParseScriptContext::P2TR, provider);
|
||||
}
|
||||
if (!subdesc) {
|
||||
ok = false;
|
||||
|
||||
Reference in New Issue
Block a user