mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-08-06 15:04:52 +02:00
fuzz: check that certain script TxoutType are nonstandard
This commit is contained in:
parent
43fc7a569c
commit
efaf80e9bb
@ -71,7 +71,15 @@ FUZZ_TARGET_INIT(script, initialize_script)
|
|||||||
(void)IsSolvable(signing_provider, script);
|
(void)IsSolvable(signing_provider, script);
|
||||||
|
|
||||||
TxoutType which_type;
|
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) {
|
if (which_type == TxoutType::NULL_DATA) {
|
||||||
assert(script.IsUnspendable());
|
assert(script.IsUnspendable());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user