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

Function FormatSubVersion

src/commons/util/util.cpp:919–928  ·  view source on GitHub ↗

Format the subversion field according to BIP 14 spec (https://en.bitcoin.it/wiki/BIP_0014)

Source from the content-addressed store, hash-verified

917
918// Format the subversion field according to BIP 14 spec (https://en.bitcoin.it/wiki/BIP_0014)
919string FormatSubVersion(const string& name, int nClientVersion, const vector<string>& comments) {
920 ostringstream ss;
921 ss << "/";
922 ss << name << ":" << FormatVersion(nClientVersion);
923 if (!comments.empty())
924 ss << ":"
925 << "(" << boost::algorithm::join(comments, "; ") << ")";
926 ss << "/";
927 return ss.str();
928}
929
930void StringReplace(string& strBase, string strSrc, string strDes) {
931 string::size_type pos = 0;

Callers 2

AppliesToMeMethod · 0.85
PushVersionMethod · 0.85

Calls 3

FormatVersionFunction · 0.85
strMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected