aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-05-04 10:15:39 -0700
committerGavin Andresen <gavinandresen@gmail.com>2013-05-04 10:15:39 -0700
commit33edd0a477f4448be9c6c4949fbff4e53f16cac6 (patch)
tree52fce70249d5eff657c7cad299c84beaf85efcfe /src/qt
parentf309cb76c2c932317307d51961ca25cf051eb255 (diff)
parent000dc55181f77cd96076c76b2cc13f8bcbe4146e (diff)
Merge pull request #2577 from gavinandresen/fee_bandaid
Treat dust outputs as non-standard, un-hardcode TX_FEE constants
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp2
-rw-r--r--src/qt/walletmodel.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 2d88700614..f525d1bb38 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -73,7 +73,7 @@ static bool ThreadSafeAskFee(int64 nFeeRequired)
{
if(!guiref)
return false;
- if(nFeeRequired < MIN_TX_FEE || nFeeRequired <= nTransactionFee || fDaemon)
+ if(nFeeRequired < CTransaction::nMinTxFee || nFeeRequired <= nTransactionFee || fDaemon)
return true;
bool payFee = false;
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 20535a451d..fb3ffc5c91 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -181,7 +181,8 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipie
CWalletTx wtx;
CReserveKey keyChange(wallet);
int64 nFeeRequired = 0;
- bool fCreated = wallet->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired);
+ std::string strFailReason;
+ bool fCreated = wallet->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired, strFailReason);
if(!fCreated)
{
@@ -189,6 +190,8 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipie
{
return SendCoinsReturn(AmountWithFeeExceedsBalance, nFeeRequired);
}
+ emit message(tr("Send Coins"), QString::fromStdString(strFailReason),
+ CClientUIInterface::MSG_ERROR);
return TransactionCreationFailed;
}
if(!uiInterface.ThreadSafeAskFee(nFeeRequired))