Format the subversion field according to BIP 14 spec (https://en.bitcoin.it/wiki/BIP_0014)
| 917 | |
| 918 | // Format the subversion field according to BIP 14 spec (https://en.bitcoin.it/wiki/BIP_0014) |
| 919 | string 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 | |
| 930 | void StringReplace(string& strBase, string strSrc, string strDes) { |
| 931 | string::size_type pos = 0; |
no test coverage detected