mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-12 13:43:43 +01:00
serialize: Drop useless version param from GetSerializeSize()
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user