mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-09 21:57:20 +01:00
wallet: use FormatFullVersion instead of CLIENT_BUILD in rpcdump
This commit is contained in:
parent
3facf0a8ae
commit
14b4802405
3 changed files with 3 additions and 4 deletions
|
@ -42,8 +42,6 @@ const std::string CLIENT_NAME("Satoshi");
|
|||
#endif
|
||||
#endif
|
||||
|
||||
const std::string CLIENT_BUILD(BUILD_DESC BUILD_SUFFIX);
|
||||
|
||||
static std::string FormatVersion(int nVersion)
|
||||
{
|
||||
return strprintf("%d.%d.%d", nVersion / 10000, (nVersion / 100) % 100, nVersion % 100);
|
||||
|
@ -51,6 +49,7 @@ static std::string FormatVersion(int nVersion)
|
|||
|
||||
std::string FormatFullVersion()
|
||||
{
|
||||
static const std::string CLIENT_BUILD(BUILD_DESC BUILD_SUFFIX);
|
||||
return CLIENT_BUILD;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ static const int CLIENT_VERSION =
|
|||
+ 1 * CLIENT_VERSION_BUILD;
|
||||
|
||||
extern const std::string CLIENT_NAME;
|
||||
extern const std::string CLIENT_BUILD;
|
||||
|
||||
|
||||
std::string FormatFullVersion();
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <chain.h>
|
||||
#include <clientversion.h>
|
||||
#include <core_io.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <key_io.h>
|
||||
|
@ -783,7 +784,7 @@ RPCHelpMan dumpwallet()
|
|||
std::sort(vKeyBirth.begin(), vKeyBirth.end());
|
||||
|
||||
// produce output
|
||||
file << strprintf("# Wallet dump created by Bitcoin %s\n", CLIENT_BUILD);
|
||||
file << strprintf("# Wallet dump created by Bitcoin %s\n", FormatFullVersion());
|
||||
file << strprintf("# * Created on %s\n", FormatISO8601DateTime(GetTime()));
|
||||
file << strprintf("# * Best block at time of backup was %i (%s),\n", wallet.GetLastBlockHeight(), wallet.GetLastBlockHash().ToString());
|
||||
file << strprintf("# mined on %s\n", FormatISO8601DateTime(block_time));
|
||||
|
|
Loading…
Add table
Reference in a new issue