Skip to content

Commit df30375

Browse files
committed
Merge bitcoin/bitcoin#22715: wallet: use FormatFullVersion() & PACKAGE_NAME in dumpwallet
2d7534b wallet: use PACKAGE_NAME instead of "Bitcoin" in rpcdump (fanquake) 14b4802 wallet: use FormatFullVersion instead of CLIENT_BUILD in rpcdump (fanquake) Pull request description: The dumpwallet RPC is the last place we're using CLIENT_BUILD directly, rather FormatFullVersion() (which just returns it), so switch to using that. At the same time, use PACKAGE_NAME (Bitcoin Core), rather than just "Bitcoin". ACKs for top commit: MarcoFalke: cr ACK 2d7534b laanwj: Tested ACK 2d7534b achow101: ACK 2d7534b Zero-1729: crACK 2d7534b Tree-SHA512: b38ee074e317448719d2a628380786ec665413515b38d9ce680c21608bc2acf6a2bf817f78f100a8310477613ae72d6969cc4f595f4f44af0896659d3ebf2671
2 parents 8a40b22 + 2d7534b commit df30375

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 %s %s\n", PACKAGE_NAME, 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)