mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Merge #20765: fuzz: check that certain script TxoutType are nonstandard
efaf80e9bb0afeca2955720bfe6c225d7864036b fuzz: check that certain script TxoutType are nonstandard (Michael Dietz) Pull request description: - Every transaction of type NONSTANDARD must not be a standard script - The only know types of nonstandard scripts are NONSTANDARD and certain NULL_DATA and MULTISIG scripts When reviewing https://github.com/bitcoin/bitcoin/pull/20761 I figured this is very similar and might also be good to have ACKs for top commit: MarcoFalke: ACK efaf80e9bb0afeca2955720bfe6c225d7864036b Tree-SHA512: 6f563ee3104ea9d2633aad95f1d003474bea759d0f22636c37aa91b5536a6ff0800c42447285ca8ed12f1b3699bf781dae1e5e0a3362da578749cd3164a06ea4
This commit is contained in:
parent
ecabacd492
commit
2d41bfbab9
@ -65,7 +65,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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user