From f0d582ade0dd693c4563a176977e78e6b78d2cef Mon Sep 17 00:00:00 2001 From: myriadcoin Date: Fri, 26 Sep 2014 02:24:54 +0200 Subject: [PATCH] Testnet Stealth enable --- src/qt/walletmodel.cpp | 3 ++- src/wallet.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 4f020796..37e8757e 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -227,7 +227,8 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact if (rcp.typeInd == AddressTableModel::AT_Stealth) { - if (chainActive.Height() < BLOCK_STEALTH_START) + if ( (!TestNet() && (chainActive.Height() < BLOCK_STEALTH_START)) + || (TestNet() && (chainActive.Height() < 200)) ) { emit message(tr("Send Coins"), tr("Stealth addresses not yet supported"), CClientUIInterface::MSG_ERROR); diff --git a/src/wallet.cpp b/src/wallet.cpp index 2fa5478c..22143d59 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1834,7 +1834,9 @@ string CWallet::SendStealthMoney(CScript scriptPubKey, int64_t nValue, std::vect CReserveKey reservekey(this); int64_t nFeeRequired; - if (chainActive.Height() < BLOCK_STEALTH_START) + if ( (!TestNet() && (chainActive.Height() < BLOCK_STEALTH_START)) + || (TestNet() && (chainActive.Height() < 200)) + ) { string strError = _("Error: Stealth addresses not yet supported"); LogPrintf("SendStealthMoney() : %s", strError.c_str());