Merge 950af7c876 into merged_master (Bitcoin PR bitcoin/bitcoin#28878)

This commit is contained in:
Byron Hambly 2025-11-10 14:27:35 +02:00
commit d46449ab86
No known key found for this signature in database
GPG key ID: DE8F6EA20A661697
36 changed files with 74 additions and 86 deletions

View file

@ -3287,7 +3287,7 @@ static bool VerifyWitnessProgram(const CScriptWitness& witness, int witversion,
if ((control[0] & TAPROOT_LEAF_MASK) == TAPROOT_LEAF_TAPSCRIPT) {
// Tapscript (leaf version 0xc4)
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);
}
@ -3296,7 +3296,7 @@ static bool VerifyWitnessProgram(const CScriptWitness& witness, int witversion,
// Tapsimplicity (leaf version 0xbe)
const valtype& simplicity_program = SpanPopBack(stack);
const valtype& simplicity_witness = SpanPopBack(stack);
const int64_t budget = ::GetSerializeSize(witness.stack, PROTOCOL_VERSION) + VALIDATION_WEIGHT_OFFSET;
const int64_t budget = ::GetSerializeSize(witness.stack) + VALIDATION_WEIGHT_OFFSET;
rawElementsTapEnv simplicityRawTap;
simplicityRawTap.controlBlock = control.data();
simplicityRawTap.pathLen = (control.size() - TAPROOT_CONTROL_BASE_SIZE) / TAPROOT_CONTROL_NODE_SIZE;