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

Method UAComment

src/options.cpp:37–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37std::vector<std::string> Opt::UAComment(bool validate) {
38 std::vector<std::string> uacomments = Args->GetMultiArgs("-uacomment");
39 if (!validate)
40 return uacomments;
41
42 typedef std::vector<std::string>::const_iterator auto_;
43 for (auto_ c = uacomments.begin(); c != uacomments.end(); ++c) {
44 size_t pos = c->find_first_of("/:()");
45 if (pos == std::string::npos)
46 continue;
47 std::stringstream ss;
48 ss << "-uacomment '" << *c << "' contains the reserved character '"
49 << c->at(pos) << "'.The following characters are reserved: / : ( )";
50 throw std::invalid_argument(ss.str());
51 }
52
53 return uacomments;
54}
55
56int Opt::ScriptCheckThreads() {
57 // -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency

Callers 2

AppInit2Function · 0.80
XTSubVersionFunction · 0.80

Calls 4

strMethod · 0.80
GetMultiArgsMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected