* Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki) */
| 63 | * Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki) |
| 64 | */ |
| 65 | std::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 | } |