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

Function ParseScriptFlags

src/test/transaction_tests.cpp:49–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47 (std::string("SIGHASH_FORKID"), (unsigned int)SCRIPT_ENABLE_SIGHASH_FORKID);
48
49unsigned int ParseScriptFlags(string strFlags)
50{
51 if (strFlags.empty()) {
52 return 0;
53 }
54 unsigned int flags = 0;
55 vector<string> words;
56 boost::algorithm::split(words, strFlags, boost::algorithm::is_any_of(","));
57
58 BOOST_FOREACH(string word, words)
59 {
60 if (!mapFlagNames.count(word))
61 BOOST_ERROR("Bad test: unknown verification flag '" << word << "'");
62 flags |= mapFlagNames[word];
63 }
64
65 return flags;
66}
67
68string FormatScriptFlags(unsigned int flags)
69{

Callers 2

BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected