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
  1. fanquake commented at 6:26 AM on August 16, 2021: member

    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".

  2. fanquake added the label Wallet on Aug 16, 2021
  3. MarcoFalke commented at 7:38 AM on August 16, 2021: member

    cr ACK d4f3fe1bb3e8d0e1d048bd1922adbc671081b249

    If you retouch, could move the string as static std::string into FormatFullVersion?

    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;
     }
     
    
  4. wallet: use FormatFullVersion instead of CLIENT_BUILD in rpcdump 14b4802405
  5. wallet: use PACKAGE_NAME instead of "Bitcoin" in rpcdump 2d7534bd93
  6. fanquake force-pushed on Aug 16, 2021
  7. 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.

  8. MarcoFalke commented at 8:20 AM on August 16, 2021: member

    cr ACK 2d7534bd93ec78609e187beaea64f1d1bdb1f81a

  9. 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:42Z
    

    Thanks for helping clean up the overly complex version mess.

  10. achow101 commented at 4:50 PM on August 16, 2021: member

    ACK 2d7534bd93ec78609e187beaea64f1d1bdb1f81a

  11. Zero-1729 commented at 6:35 PM on August 16, 2021: contributor

    crACK 2d7534b

  12. fanquake merged this on Aug 17, 2021
  13. fanquake closed this on Aug 17, 2021

  14. fanquake deleted the branch on Aug 17, 2021
  15. sidhujag referenced this in commit ed1fc5b2bf on Aug 20, 2021
  16. DrahtBot locked this on Aug 18, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me