MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetScriptFlagNames

Function GetScriptFlagNames

src/script/interpreter.cpp:2208–2225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2206}
2207
2208std::vector<std::string> GetScriptFlagNames(script_verify_flags flags)
2209{
2210 std::vector<std::string> res;
2211 if (flags == SCRIPT_VERIFY_NONE) {
2212 return res;
2213 }
2214 script_verify_flags leftover = flags;
2215 for (const auto& [name, flag] : ScriptFlagNamesToEnum()) {
2216 if ((flags & flag) != 0) {
2217 res.push_back(name);
2218 leftover &= ~flag;
2219 }
2220 }
2221 if (leftover != 0) {
2222 res.push_back(strprintf("0x%08x", leftover.as_int()));
2223 }
2224 return res;
2225}

Callers 2

FormatScriptFlagsFunction · 0.85
getdeploymentinfoFunction · 0.85

Calls 2

as_intMethod · 0.80
push_backMethod · 0.45

Tested by 1

FormatScriptFlagsFunction · 0.68