MCPcopy Create free account
hub / github.com/ElementsProject/elements / ParseScriptFlags

Function ParseScriptFlags

src/test/transaction_tests.cpp:70–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68};
69
70unsigned int ParseScriptFlags(std::string strFlags)
71{
72 if (strFlags.empty() || strFlags == "NONE") return 0;
73 unsigned int flags = 0;
74 std::vector<std::string> words;
75 boost::algorithm::split(words, strFlags, boost::algorithm::is_any_of(","));
76
77 for (const std::string& word : words)
78 {
79 if (!mapFlagNames.count(word))
80 BOOST_ERROR("Bad test: unknown verification flag '" << word << "'");
81 flags |= mapFlagNames[word];
82 }
83
84 return flags;
85}
86
87// Check that all flags in STANDARD_SCRIPT_VERIFY_FLAGS are present in mapFlagNames.
88bool CheckMapFlagNames()

Callers 3

BOOST_AUTO_TEST_CASEFunction · 0.70
BOOST_AUTO_TEST_CASEFunction · 0.70
AssetTestFunction · 0.70

Calls 2

countMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected