MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / XTSubVersion

Function XTSubVersion

src/clientversion.cpp:155–174  ·  view source on GitHub ↗

* The default Bitcoin XT subversion field according to BIP 14 spec */

Source from the content-addressed store, hash-verified

153 * The default Bitcoin XT subversion field according to BIP 14 spec
154 */
155std::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}

Callers 3

AppInit2Function · 0.85
PushVersionMethod · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 10

OptClass · 0.85
FormatSubVersionFunction · 0.85
GetPlatformDetailsFunction · 0.85
UACommentMethod · 0.80
IsStealthModeMethod · 0.80
HidePlatformMethod · 0.80
strMethod · 0.80
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68