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".
wallet: use `FormatFullVersion()` & `PACKAGE_NAME` in dumpwallet #22715
pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:rpcdump_use_formatfullversion changing 3 files +3 −4-
fanquake commented at 6:26 AM on August 16, 2021: member
- fanquake added the label Wallet on Aug 16, 2021
-
MarcoFalke commented at 7:38 AM on August 16, 2021: member
cr ACK d4f3fe1bb3e8d0e1d048bd1922adbc671081b249
If you retouch, could move the string as
static std::stringintoFormatFullVersion?diff --git a/src/clientversion.cpp b/src/clientversion.cpp index 29c38e2d3b..8ea5aa86f8 100644 --- a/src/clientversion.cpp +++ b/src/clientversion.cpp @@ -40,8 +40,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); @@ -49,6 +47,7 @@ static std::string FormatVersion(int nVersion) std::string FormatFullVersion() { + static const std::string CLIENT_BUILD{BUILD_DESC BUILD_SUFFIX}; return CLIENT_BUILD; } -
wallet: use FormatFullVersion instead of CLIENT_BUILD in rpcdump 14b4802405
-
wallet: use PACKAGE_NAME instead of "Bitcoin" in rpcdump 2d7534bd93
- fanquake force-pushed on Aug 16, 2021
-
fanquake commented at 8:07 AM on August 16, 2021: member
If you retouch, could move the string as static std::string into FormatFullVersion?
Have taken your suggestion.
-
MarcoFalke commented at 8:20 AM on August 16, 2021: member
cr ACK 2d7534bd93ec78609e187beaea64f1d1bdb1f81a
-
laanwj commented at 2:19 PM on August 16, 2021: member
Tested ACK 2d7534bd93ec78609e187beaea64f1d1bdb1f81a
--- /tmp/wallet1.test 2021-08-16 15:41:52.300068643 +0200 +++ /tmp/wallet2.test 2021-08-16 16:16:08.662063685 +0200 @@ -1,5 +1,5 @@ -# Wallet dump created by Bitcoin v22.99.0-42b00a37580a -# * Created on 2021-08-16T13:41:52Z +# Wallet dump created by Bitcoin Core v22.99.0-f13089244472 +# * Created on 2021-08-16T14:16:08Z # * Best block at time of backup was 0 (0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206), # mined on 2011-02-02T23:16:42ZThanks for helping clean up the overly complex version mess.
-
achow101 commented at 4:50 PM on August 16, 2021: member
ACK 2d7534bd93ec78609e187beaea64f1d1bdb1f81a
-
Zero-1729 commented at 6:35 PM on August 16, 2021: contributor
crACK 2d7534b
- fanquake merged this on Aug 17, 2021
- fanquake closed this on Aug 17, 2021
- fanquake deleted the branch on Aug 17, 2021
- sidhujag referenced this in commit ed1fc5b2bf on Aug 20, 2021
- DrahtBot locked this on Aug 18, 2022