18 #ifdef HAVE_BUILD_INFO 30 #define BUILD_DESC BUILD_GIT_TAG 31 #define BUILD_SUFFIX "" 33 #define BUILD_DESC "v" STRINGIZE(CLIENT_VERSION_MAJOR) "." STRINGIZE(CLIENT_VERSION_MINOR) \ 34 "." STRINGIZE(CLIENT_VERSION_REVISION) "." STRINGIZE(CLIENT_VERSION_BUILD) 35 #ifdef BUILD_GIT_COMMIT 36 #define BUILD_SUFFIX "-" BUILD_GIT_COMMIT 37 #elif defined(GIT_COMMIT_ID) 38 #define BUILD_SUFFIX "-g" GIT_COMMIT_ID 40 #define BUILD_SUFFIX "-unk" 48 if (nVersion % 100 == 0)
49 return strprintf(
"%d.%d.%d", nVersion / 1000000, (nVersion / 10000) % 100, (nVersion / 100) % 100);
51 return strprintf(
"%d.%d.%d.%d", nVersion / 1000000, (nVersion / 10000) % 100, (nVersion / 100) % 100, nVersion % 100);
62 std::string
FormatSubVersion(
const std::string&
name,
int nClientVersion,
const std::vector<std::string>& comments)
64 std::ostringstream ss;
67 if (!comments.empty())
69 std::vector<std::string>::const_iterator
it(comments.begin());
71 for(++it; it != comments.end(); ++
it)
std::deque< CInv >::iterator it
const std::string CLIENT_BUILD(BUILD_DESC BUILD_SUFFIX)
const std::string CLIENT_NAME("Satoshi")
Name of client reported in the 'version' message.
std::string FormatFullVersion()
static std::string FormatVersion(int nVersion)
#define BUILD_DESC
git will put "#define GIT_COMMIT_ID ..." on the next line inside archives.
std::string FormatSubVersion(const std::string &name, int nClientVersion, const std::vector< std::string > &comments)
Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip...