From ee303c89fb3e55aff7b1d65c3aab1b5b7f4bb071 Mon Sep 17 00:00:00 2001 From: Evan Duffield Date: Thu, 17 Jul 2014 02:29:41 -0700 Subject: [PATCH] darksend disabled --- src/init.cpp | 13 +++++++++---- src/main.cpp | 2 ++ src/util.cpp | 1 + src/util.h | 1 + 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index c4bd7ec5cd..fbedc0d92e 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1168,11 +1168,16 @@ bool AppInit2(boost::thread_group& threadGroup) } } - nDarksendRounds = GetArg("-darksendrounds", 2); - if(nDarksendRounds > 8) nDarksendRounds = 8; - if(nDarksendRounds < 1) nDarksendRounds = 1; + fDisableDarksend = GetBoolArg("-disabledarksend", false); + if(!fDisableDarksend){ + nDarksendRounds = GetArg("-darksendrounds", 2); + if(nDarksendRounds > 8) nDarksendRounds = 8; + if(nDarksendRounds < 1) nDarksendRounds = 1; - printf("Darksend rounds %d\n", nDarksendRounds); + printf("Darksend rounds %d\n", nDarksendRounds); + } else { + printf("Darksend is disabled!\n"); + } darkSendDenominations.push_back( 1000 * COIN ); darkSendDenominations.push_back( 100 * COIN ); diff --git a/src/main.cpp b/src/main.cpp index 5c98781542..8230d428e0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6954,6 +6954,8 @@ int CDarkSendPool::GetCurrentMasterNode(int mod, int64 nBlockHeight) void CDarkSendPool::DoAutomaticDenominating() { + if(fDisableDarksend) return; + // ** find the coins we'll use std::vector vCoins; int64 nValueMin = 0.01*COIN; diff --git a/src/util.cpp b/src/util.cpp index 7dde1026b1..c519ab6359 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -74,6 +74,7 @@ bool fMasterNode = false; string strMasterNodePrivKey = ""; string strMasterNodeAddr = ""; int nDarksendRounds = 2; +bool fDisableDarksend = false; bool fDebug = false; bool fDebugNet = false; bool fPrintToConsole = false; diff --git a/src/util.h b/src/util.h index 823325f167..4a0ac4023b 100644 --- a/src/util.h +++ b/src/util.h @@ -131,6 +131,7 @@ extern std::map mapArgs; extern std::map > mapMultiArgs; extern bool fMasterNode; extern int nDarksendRounds; +extern bool fDisableDarksend; extern std::string strMasterNodeAddr; extern bool fDebug; extern bool fDebugNet;