Bitcoin Core
28.99.0
P2P Digital Currency
src
test
util
script.cpp
Go to the documentation of this file.
1
// Copyright (c) 2021 The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#include <
script/interpreter.h
>
6
#include <
test/util/script.h
>
7
8
bool
IsValidFlagCombination
(
unsigned
flags
)
9
{
10
if
(
flags
&
SCRIPT_VERIFY_CLEANSTACK
&& ~
flags
& (
SCRIPT_VERIFY_P2SH
|
SCRIPT_VERIFY_WITNESS
))
return
false
;
11
if
(
flags
&
SCRIPT_VERIFY_WITNESS
&& ~
flags
&
SCRIPT_VERIFY_P2SH
)
return
false
;
12
return
true
;
13
}
flags
int flags
Definition:
bitcoin-tx.cpp:536
interpreter.h
SCRIPT_VERIFY_P2SH
@ SCRIPT_VERIFY_P2SH
Definition:
interpreter.h:49
SCRIPT_VERIFY_WITNESS
@ SCRIPT_VERIFY_WITNESS
Definition:
interpreter.h:108
SCRIPT_VERIFY_CLEANSTACK
@ SCRIPT_VERIFY_CLEANSTACK
Definition:
interpreter.h:94
IsValidFlagCombination
bool IsValidFlagCombination(unsigned flags)
Flags that are not forbidden by an assert in script validation.
Definition:
script.cpp:8
script.h
Generated on Wed Dec 18 2024 20:00:13 for Bitcoin Core by
1.9.4