* Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki) */
| 61 | * Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki) |
| 62 | */ |
| 63 | std::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 | |
| 80 | std::string CopyrightHolders(const std::string& strPrefix) |
| 81 | { |