diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-09-10 14:29:16 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-09-10 15:07:58 +0200 |
commit | f23869e14bf7710f05f128544f2778dde28a01b7 (patch) | |
tree | b0e93e2202c1126484189c9f8400b4faba41c5d1 /src/qt | |
parent | fd1caa0961d9a5ceef0b8b232f278c9c27605d63 (diff) | |
parent | e84843c0dbb9cb853b912c09858b01c5c9302b09 (diff) |
Merge pull request #4623
e84843c Broken addresses on command line no longer trigger testnet. (Ross Nicoll)
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/paymentserver.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp index f6a4b599de..219a685faf 100644 --- a/src/qt/paymentserver.cpp +++ b/src/qt/paymentserver.cpp @@ -10,6 +10,7 @@ #include "optionsmodel.h" #include "base58.h" +#include "chainparams.h" #include "ui_interface.h" #include "util.h" #include "wallet.h" @@ -200,8 +201,11 @@ bool PaymentServer::ipcParseCommandLine(int argc, char* argv[]) { CBitcoinAddress address(r.address.toStdString()); - SelectParams(CBaseChainParams::MAIN); - if (!address.IsValid()) + if (address.IsValid(Params(CBaseChainParams::MAIN))) + { + SelectParams(CBaseChainParams::MAIN); + } + else if (address.IsValid(Params(CBaseChainParams::TESTNET))) { SelectParams(CBaseChainParams::TESTNET); } |