Skip to content

Commit 14b4802

Browse files
committed
wallet: use FormatFullVersion instead of CLIENT_BUILD in rpcdump
1 parent 3facf0a commit 14b4802

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/clientversion.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,14 @@ const std::string CLIENT_NAME("Satoshi");
4242
#endif
4343
#endif
4444

45-
const std::string CLIENT_BUILD(BUILD_DESC BUILD_SUFFIX);
46-
4745
static std::string FormatVersion(int nVersion)
4846
{
4947
return strprintf("%d.%d.%d", nVersion / 10000, (nVersion / 100) % 100, nVersion % 100);
5048
}
5149

5250
std::string FormatFullVersion()
5351
{
52+
static const std::string CLIENT_BUILD(BUILD_DESC BUILD_SUFFIX);
5453
return CLIENT_BUILD;
5554
}
5655

src/clientversion.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ static const int CLIENT_VERSION =
3636
+ 1 * CLIENT_VERSION_BUILD;
3737

3838
extern const std::string CLIENT_NAME;
39-
extern const std::string CLIENT_BUILD;
4039

4140

4241
std::string FormatFullVersion();

src/wallet/rpcdump.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
#include <chain.h>
6+
#include <clientversion.h>
67
#include <core_io.h>
78
#include <interfaces/chain.h>
89
#include <key_io.h>
@@ -783,7 +784,7 @@ RPCHelpMan dumpwallet()
783784
std::sort(vKeyBirth.begin(), vKeyBirth.end());
784785

785786
// produce output
786-
file << strprintf("# Wallet dump created by Bitcoin %s\n", CLIENT_BUILD);
787+
file << strprintf("# Wallet dump created by Bitcoin %s\n", FormatFullVersion());
787788
file << strprintf("# * Created on %s\n", FormatISO8601DateTime(GetTime()));
788789
file << strprintf("# * Best block at time of backup was %i (%s),\n", wallet.GetLastBlockHeight(), wallet.GetLastBlockHash().ToString());
789790
file << strprintf("# mined on %s\n", FormatISO8601DateTime(block_time));

0 commit comments

Comments
 (0)