From fd7992dc616b2b4a41ab97bc6425361047fc9612 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sat, 7 Feb 2015 05:18:37 +0300 Subject: [PATCH] fix MakeCollateralAmounts stuck sometimes and wouldn't let denominating further --- src/darksend.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/darksend.cpp b/src/darksend.cpp index c35ced95f..d67207968 100644 --- a/src/darksend.cpp +++ b/src/darksend.cpp @@ -1682,14 +1682,8 @@ bool CDarkSendPool::SendRandomPaymentToSelf() // Split up large inputs or create fee sized inputs bool CDarkSendPool::MakeCollateralAmounts() { - // should split up to remaining amount only... - int64_t nTotalBalance = pwalletMain->GetBalance(); - int64_t nSplitBalance = nAnonymizeDarkcoinAmount*COIN - pwalletMain->GetDenominatedBalance(); - if(nSplitBalance > nTotalBalance) nSplitBalance = nTotalBalance; int64_t nTotalOut = 0; - LogPrintf("DoAutomaticDenominating: MakeCollateralAmounts: nSplitBalance %d nTotalBalance %d\n", nSplitBalance, pwalletMain->GetDenominatedBalance(false)); - // make our change address CReserveKey reservekey(pwalletMain); @@ -1708,11 +1702,6 @@ bool CDarkSendPool::MakeCollateralAmounts() vecSend.push_back(make_pair(scriptChange, (DARKSEND_COLLATERAL*2)+DARKSEND_FEE)); nTotalOut += (DARKSEND_COLLATERAL*2)+DARKSEND_FEE; - if(nTotalOut > nSplitBalance) { - LogPrintf("MakeCollateralAmounts: Not enough balance to split\n"); - return false; - } - CCoinControl *coinControl=NULL; // try to use non-denominated and not mn-like funds bool success = pwalletMain->CreateTransaction(vecSend, wtx, reservekey,