Changeset View
Changeset View
Standalone View
Standalone View
src/qt/walletmodel.cpp
Show First 20 Lines • Show All 282 Lines • ▼ Show 20 Lines | if (total > nBalance) { | ||||
if (!fSubtractFeeFromAmount && (total + nFeeRequired) > nBalance) { | if (!fSubtractFeeFromAmount && (total + nFeeRequired) > nBalance) { | ||||
return SendCoinsReturn(AmountWithFeeExceedsBalance); | return SendCoinsReturn(AmountWithFeeExceedsBalance); | ||||
} | } | ||||
Q_EMIT message(tr("Send Coins"), | Q_EMIT message(tr("Send Coins"), | ||||
QString::fromStdString(strFailReason), | QString::fromStdString(strFailReason), | ||||
CClientUIInterface::MSG_ERROR); | CClientUIInterface::MSG_ERROR); | ||||
return TransactionCreationFailed; | return TransactionCreationFailed; | ||||
} | } | ||||
// reject absurdly high fee. (This can never happen because the wallet | |||||
// caps the fee at maxTxFee. This merely serves as a belt-and-suspenders | |||||
// check) | |||||
if (nFeeRequired > Amount(maxTxFee)) { | |||||
return AbsurdFee; | |||||
} | |||||
} | } | ||||
return SendCoinsReturn(OK); | return SendCoinsReturn(OK); | ||||
} | } | ||||
WalletModel::SendCoinsReturn | WalletModel::SendCoinsReturn | ||||
WalletModel::sendCoins(WalletModelTransaction &transaction) { | WalletModel::sendCoins(WalletModelTransaction &transaction) { | ||||
/* store serialized transaction */ | /* store serialized transaction */ | ||||
▲ Show 20 Lines • Show All 419 Lines • Show Last 20 Lines |