MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / ParseScriptFlags

Function ParseScriptFlags

src/test/transaction_tests.cpp:59–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57};
58
59unsigned int ParseScriptFlags(std::string strFlags)
60{
61 if (strFlags.empty()) {
62 return 0;
63 }
64 unsigned int flags = 0;
65 std::vector<std::string> words;
66 boost::algorithm::split(words, strFlags, boost::algorithm::is_any_of(","));
67
68 for (std::string word : words)
69 {
70 if (!mapFlagNames.count(word))
71 BOOST_ERROR("Bad test: unknown verification flag '" << word << "'");
72 flags |= mapFlagNames[word];
73 }
74
75 return flags;
76}
77
78std::string FormatScriptFlags(unsigned int flags)
79{

Callers 2

BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 2

emptyMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected