aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-08-28 09:20:50 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2017-08-28 09:20:50 +0200
commit55509f1a11003837714071d05ea878b340757a76 (patch)
treef383c41d3a9564ff7bae1a86d7aa1b3f42b86c21 /src/wallet
parent3f726c99f819f97f2ab21b94d34c6b3129cd883a (diff)
downloadbitcoin-55509f1a11003837714071d05ea878b340757a76.tar.xz
Document assumptions that are being made to avoid division by zero
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 291bcc7a20..6d94154da8 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -2741,6 +2741,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT
if (recipient.fSubtractFeeFromAmount)
{
+ assert(nSubtractFeeFromAmount != 0);
txout.nValue -= nFeeRet / nSubtractFeeFromAmount; // Subtract fee equally from each selected recipient
if (fFirst) // first receiver pays the remainder not divisible by output count