From e28a4d9c9ab88e44ffaa4a33b0a32097fe56e7d8 Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Wed, 24 Oct 2018 22:33:45 -0700 Subject: [PATCH] Account for tx fees --- src/turnstile.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/turnstile.cpp b/src/turnstile.cpp index bb15260..349db59 100644 --- a/src/turnstile.cpp +++ b/src/turnstile.cpp @@ -35,6 +35,9 @@ void Turnstile::fillAmounts(QList& amounts, double amount, int count) { // Reduce the Dev Tx fee from the amount actual = actual - 0.0001; //Utils::getDevFee(); + // Also account for the fees needed to send all these transactions + actual = actual - (Utils::getMinerFee() * (amounts.size() + 1)); + // Calculate the chaff. double chaff = amount - actual;