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

Function FormatSubVersion

src/clientversion.cpp:63–78  ·  view source on GitHub ↗

* Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki) */

Source from the content-addressed store, hash-verified

61 * Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki)
62 */
63std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments)
64{
65 std::ostringstream ss;
66 ss << "/";
67 ss << name << ":" << FormatVersion(nClientVersion);
68 if (!comments.empty())
69 {
70 std::vector<std::string>::const_iterator it(comments.begin());
71 ss << "(" << *it;
72 for(++it; it != comments.end(); ++it)
73 ss << "; " << *it;
74 ss << ")";
75 }
76 ss << "/";
77 return ss.str();
78}
79
80std::string CopyrightHolders(const std::string& strPrefix)
81{

Callers 3

AppInitMainFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
FUZZ_TARGETFunction · 0.85

Calls 5

FormatVersionFunction · 0.85
strMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGETFunction · 0.68