diff options
author | Anthony Towns <aj@erisian.com.au> | 2023-11-01 22:46:17 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2023-11-16 11:14:13 +1000 |
commit | 1410d300df7e57a895f2697d9849a2201021c973 (patch) | |
tree | cf74f8da1b94c7237bca1162a903b004e2ef62a4 /src/script | |
parent | bf574a75016123309b894da895ab1c7a81731933 (diff) |
serialize: Drop useless version param from GetSerializeSize()
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); } } |