Merge 2dab2d239a into merged_master (Bitcoin PR #20765)

This commit is contained in:
Andrew Poelstra 2021-06-16 15:48:40 +00:00
commit da64813a8a

View file

@ -71,7 +71,15 @@ FUZZ_TARGET_INIT(script, initialize_script)
(void)IsSolvable(signing_provider, script);
TxoutType which_type;
(void)IsStandard(script, which_type);
bool is_standard_ret = IsStandard(script, which_type);
if (!is_standard_ret) {
assert(which_type == TxoutType::NONSTANDARD ||
which_type == TxoutType::NULL_DATA ||
which_type == TxoutType::MULTISIG);
}
if (which_type == TxoutType::NONSTANDARD) {
assert(!is_standard_ret);
}
if (which_type == TxoutType::NULL_DATA) {
assert(script.IsUnspendable());
}