From cfc8954b42ad273a2aa4fb0cdeb8a0ed18343332 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 2 Feb 2017 12:50:21 +0400 Subject: [PATCH] Shift PS denoms (#1292) * Shift PS denoms * fix ui PS restrictions --- src/darksend.cpp | 4 +++- src/darksend.h | 2 +- src/qt/overviewpage.cpp | 7 +++---- src/version.h | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/darksend.cpp b/src/darksend.cpp index 9cd439ddc..db1faa890 100644 --- a/src/darksend.cpp +++ b/src/darksend.cpp @@ -436,12 +436,14 @@ void CDarksendPool::InitDenominations() 1DRK+1000 == (.1DRK+100)*10 10DRK+10000 == (1DRK+1000)*10 */ + /* Disabled vecPrivateSendDenominations.push_back( (100 * COIN)+100000 ); + */ vecPrivateSendDenominations.push_back( (10 * COIN)+10000 ); vecPrivateSendDenominations.push_back( (1 * COIN)+1000 ); vecPrivateSendDenominations.push_back( (.1 * COIN)+100 ); - /* Disabled till we need them vecPrivateSendDenominations.push_back( (.01 * COIN)+10 ); + /* Disabled till we need them vecPrivateSendDenominations.push_back( (.001 * COIN)+1 ); */ } diff --git a/src/darksend.h b/src/darksend.h index 1e5e82296..8444a760c 100644 --- a/src/darksend.h +++ b/src/darksend.h @@ -19,7 +19,7 @@ static const int PRIVATESEND_QUEUE_TIMEOUT = 30; static const int PRIVATESEND_SIGNING_TIMEOUT = 15; //! minimum peer version accepted by mixing pool -static const int MIN_PRIVATESEND_PEER_PROTO_VERSION = 70204; +static const int MIN_PRIVATESEND_PEER_PROTO_VERSION = 70206; static const CAmount PRIVATESEND_COLLATERAL = 0.001 * COIN; static const CAmount PRIVATESEND_POOL_MAX = 999.999 * COIN; diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index 477b5770d..def9a570b 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -597,10 +597,9 @@ void OverviewPage::togglePrivateSend(){ settings.setValue("hasMixed", "hasMixed"); } if(!fEnablePrivateSend){ - int64_t balance = currentBalance; - float minAmount = 1.49 * COIN; - if(balance < minAmount){ - QString strMinAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, minAmount)); + CAmount nMinAmount = vecPrivateSendDenominations.back() + PRIVATESEND_COLLATERAL*4; + if(currentBalance < nMinAmount){ + QString strMinAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, nMinAmount)); QMessageBox::warning(this, tr("PrivateSend"), tr("PrivateSend requires at least %1 to use.").arg(strMinAmount), QMessageBox::Ok, QMessageBox::Ok); diff --git a/src/version.h b/src/version.h index 10fee6e3d..8b2fcf96d 100644 --- a/src/version.h +++ b/src/version.h @@ -10,7 +10,7 @@ * network protocol versioning */ -static const int PROTOCOL_VERSION = 70205; +static const int PROTOCOL_VERSION = 70206; //! initial proto version, to be increased after version/verack negotiation static const int INIT_PROTO_VERSION = 209;