mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 22:42:04 +01:00
fuzz: Check that NULL_DATA is unspendable
This commit is contained in:
parent
1be6f2dba9
commit
fa26303286
1 changed files with 7 additions and 1 deletions
|
@ -72,6 +72,13 @@ FUZZ_TARGET_INIT(script, initialize_script)
|
|||
|
||||
TxoutType which_type;
|
||||
(void)IsStandard(script, which_type);
|
||||
if (which_type == TxoutType::NULL_DATA) {
|
||||
assert(script.IsUnspendable());
|
||||
}
|
||||
if (script.IsUnspendable()) {
|
||||
assert(which_type == TxoutType::NULL_DATA ||
|
||||
which_type == TxoutType::NONSTANDARD);
|
||||
}
|
||||
|
||||
(void)RecursiveDynamicUsage(script);
|
||||
|
||||
|
@ -82,7 +89,6 @@ FUZZ_TARGET_INIT(script, initialize_script)
|
|||
(void)script.IsPayToScriptHash();
|
||||
(void)script.IsPayToWitnessScriptHash();
|
||||
(void)script.IsPushOnly();
|
||||
(void)script.IsUnspendable();
|
||||
(void)script.GetSigOpCount(/* fAccurate= */ false);
|
||||
|
||||
(void)FormatScript(script);
|
||||
|
|
Loading…
Add table
Reference in a new issue