* The default Bitcoin XT subversion field according to BIP 14 spec */
| 153 | * The default Bitcoin XT subversion field according to BIP 14 spec |
| 154 | */ |
| 155 | std::string XTSubVersion(uint64_t nMaxBlockSize) |
| 156 | { |
| 157 | std::vector<std::string> comments = Opt().UAComment(); |
| 158 | |
| 159 | if (Opt().IsStealthMode()) |
| 160 | return FormatSubVersion("Satoshi", CLIENT_VERSION, comments, ""); |
| 161 | |
| 162 | if (!Opt().HidePlatform()) { |
| 163 | std::vector<std::string> p = GetPlatformDetails(); |
| 164 | comments.insert(comments.end(), p.begin(), p.end()); |
| 165 | } |
| 166 | |
| 167 | // Announce our excessive block acceptence. |
| 168 | std::stringstream ss; |
| 169 | double dMaxBlockSize = double(nMaxBlockSize)/1000000; |
| 170 | ss << "EB" << std::setprecision(int(log10(dMaxBlockSize))+7) << dMaxBlockSize; |
| 171 | comments.insert(end(comments), ss.str()); |
| 172 | |
| 173 | return FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, comments, CLIENT_VERSION_XT_SUBVER); |
| 174 | } |