mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-26 06:48:53 +02:00
Merge #21553: fuzz: Misc refactor
fa4926cca6fuzz: [refactor] Use IsValidFlagCombination in signature_checker fuzz target (MarcoFalke)eeee8f5be1fuzz: Removed unused try-catch in coins_view (MarcoFalke)fa98f3f66efuzz: [refactor] Use ConsumeScript in signature_checker fuzz target (MarcoFalke) Pull request description: Some small refactors to remove unused and redundant fuzz code ACKs for top commit: practicalswift: cr re-ACKfa4926cca6Tree-SHA512: eb07a2140caad7b31495b76385fc7634cf5b6daa4947f430ebb127eb1375583dc11e541a0a42d0e5d93d430480b8a815b93974450fd5ed897528a2d47c752f86
This commit is contained in:
13
src/test/util/script.cpp
Normal file
13
src/test/util/script.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
// Copyright (c) 2021 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <script/interpreter.h>
|
||||
#include <test/util/script.h>
|
||||
|
||||
bool IsValidFlagCombination(unsigned flags)
|
||||
{
|
||||
if (flags & SCRIPT_VERIFY_CLEANSTACK && ~flags & (SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS)) return false;
|
||||
if (flags & SCRIPT_VERIFY_WITNESS && ~flags & SCRIPT_VERIFY_P2SH) return false;
|
||||
return true;
|
||||
}
|
||||
@@ -18,4 +18,7 @@ static const CScript P2WSH_OP_TRUE{
|
||||
return hash;
|
||||
}())};
|
||||
|
||||
/** Flags that are not forbidden by an assert in script validation */
|
||||
bool IsValidFlagCombination(unsigned flags);
|
||||
|
||||
#endif // BITCOIN_TEST_UTIL_SCRIPT_H
|
||||
|
||||
Reference in New Issue
Block a user