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

Function FormatScriptFlags

src/test/transaction_tests.cpp:97–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97std::string FormatScriptFlags(unsigned int flags)
98{
99 if (flags == 0) {
100 return "";
101 }
102 std::string ret;
103 std::map<std::string, unsigned int>::const_iterator it = mapFlagNames.begin();
104 while (it != mapFlagNames.end()) {
105 if (flags & it->second) {
106 ret += it->first + ",";
107 }
108 it++;
109 }
110 return ret.substr(0, ret.size() - 1);
111}
112
113/*
114* Check that the input scripts of a transaction are valid/invalid as expected.

Callers 1

GetJSONMethod · 0.85

Calls 3

beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected