diff options
author | fanquake <fanquake@gmail.com> | 2022-02-21 19:32:59 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-02-22 15:36:19 +0000 |
commit | 2618fb8d15d01dca967856c92ebf3e4cc09699a2 (patch) | |
tree | 6377a1dd975610fa9f8548ec0b3a1bc38f062019 /src/bitcoin-wallet.cpp | |
parent | 4c3e3c57463b029d335e685d3dcdaf26456666cf (diff) |
Output license info when binaries are passed -version
Consolidate to outputting the licensing info when we pass -version to a binary,
i.e bitcoind -version:
```bash
itcoin Core version v22.99.0-fc1f355913f6-dirty
Copyright (C) 2009-2022 The Bitcoin Core developers
Please contribute if you find Bitcoin Core useful. Visit
<https://bitcoincore.org/> for further information about the software.
The source code is available from <https://github.com/bitcoin/bitcoin>.
This is experimental software.
Distributed under the MIT software license, see the accompanying file COPYING
or <https://opensource.org/licenses/MIT>
```
Diffstat (limited to 'src/bitcoin-wallet.cpp')
-rw-r--r-- | src/bitcoin-wallet.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bitcoin-wallet.cpp b/src/bitcoin-wallet.cpp index ff5485e2da..2f3dd45267 100644 --- a/src/bitcoin-wallet.cpp +++ b/src/bitcoin-wallet.cpp @@ -59,7 +59,10 @@ static bool WalletAppInit(ArgsManager& args, int argc, char* argv[]) } if (argc < 2 || HelpRequested(args) || args.IsArgSet("-version")) { std::string strUsage = strprintf("%s bitcoin-wallet version", PACKAGE_NAME) + " " + FormatFullVersion() + "\n"; - if (!args.IsArgSet("-version")) { + + if (args.IsArgSet("-version")) { + strUsage += FormatParagraph(LicenseInfo()); + } else { strUsage += "\n" "bitcoin-wallet is an offline tool for creating and interacting with " PACKAGE_NAME " wallet files.\n" "By default bitcoin-wallet will act on wallets in the default mainnet wallet directory in the datadir.\n" |