diff options
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/interpreter.cpp | 2 | ||||
-rw-r--r-- | src/script/sign.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 5f4a1aceb2..c969ce45f1 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1934,7 +1934,7 @@ static bool VerifyWitnessProgram(const CScriptWitness& witness, int witversion, if ((control[0] & TAPROOT_LEAF_MASK) == TAPROOT_LEAF_TAPSCRIPT) { // Tapscript (leaf version 0xc0) exec_script = CScript(script.begin(), script.end()); - execdata.m_validation_weight_left = ::GetSerializeSize(witness.stack, PROTOCOL_VERSION) + VALIDATION_WEIGHT_OFFSET; + execdata.m_validation_weight_left = ::GetSerializeSize(witness.stack) + VALIDATION_WEIGHT_OFFSET; execdata.m_validation_weight_left_init = true; return ExecuteWitnessScript(stack, exec_script, flags, SigVersion::TAPSCRIPT, checker, execdata, serror); } diff --git a/src/script/sign.cpp b/src/script/sign.cpp index 251a8420f7..be4b357568 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -379,7 +379,7 @@ static bool SignTaproot(const SigningProvider& provider, const BaseSignatureCrea result_stack.emplace_back(std::begin(script), std::end(script)); // Push the script result_stack.push_back(*control_blocks.begin()); // Push the smallest control block if (smallest_result_stack.size() == 0 || - GetSerializeSize(result_stack, PROTOCOL_VERSION) < GetSerializeSize(smallest_result_stack, PROTOCOL_VERSION)) { + GetSerializeSize(result_stack) < GetSerializeSize(smallest_result_stack)) { smallest_result_stack = std::move(result_stack); } } |