MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / FormatSubVersion

Function FormatSubVersion

src/clientversion.cpp:65–70  ·  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

63 * Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki)
64 */
65std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments)
66{
67 std::string comments_str;
68 if (!comments.empty()) comments_str = strprintf("(%s)", Join(comments, "; "));
69 return strprintf("/%s:%s%s/", name, FormatVersion(nClientVersion), comments_str);
70}

Callers 3

AppInitMainFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
FUZZ_TARGETFunction · 0.85

Calls 3

JoinFunction · 0.85
FormatVersionFunction · 0.85
emptyMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGETFunction · 0.68