diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index 2963acd958..da7b9b5bb5 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -527,9 +527,9 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog, bool a { if (anonymousMode) { if(spark::IsSparkAllowed()) { - // 924 is constant part, mainly Schnorr and Range proofs, 2535 is for each grootle proof/aux data - // 213 for each private output, 144 other parts of tx, - nBytes = 924 + 2535 * (vOutputs.size()) + 213 * CoinControlDialog::payAmounts.size() + 144; + // 924 is constant part, mainly Schnorr and Range proofs, 1803 is for each grootle proof/aux data + // 213 for each private output, + nBytes = 924 + 1803 * (vOutputs.size()) + 322 * CoinControlDialog::payAmounts.size(); } else { // 1054 is constant part, mainly Schnorr and Range proofs, 2560 is for each sigma/aux data // 83 assuming 1 jmint, 34 is the size of each normal vout, 10 is the size of empty transaction, 52 other constant parts diff --git a/src/spark/sparkwallet.cpp b/src/spark/sparkwallet.cpp index 79c973703b..23bd19ab49 100644 --- a/src/spark/sparkwallet.cpp +++ b/src/spark/sparkwallet.cpp @@ -1697,9 +1697,9 @@ std::pair> CSparkWallet::SelectSparkCoins( throw std::invalid_argument(_("Unable to select cons for spend")); } - // 924 is constant part, mainly Schnorr and Range proofs, 2535 is for each grootle proof/aux data - // 213 for each private output, 144 other parts of tx, - size = 924 + 2535 * (spendCoins.size()) + 213 * mintNum + 144; //TODO (levon) take in account also utxoNum + // 1803 is for first grootle proof/aux data + // 213 for each private output, 34 for each utxo,924 constant parts of tx parts of tx, + size = 924 + 1803*(spendCoins.size()) + 322*(mintNum+1) + 34*utxoNum; CAmount feeNeeded = CWallet::GetMinimumFee(size, nTxConfirmTarget, mempool); if (fee >= feeNeeded) {