diff options
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r-- | src/qt/guiutil.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 32131bc39d..c951b21b80 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -148,6 +148,14 @@ bool parseBitcoinURI(QString uri, SendCoinsRecipient *out) return parseBitcoinURI(uriInstance, out); } +bool isDust(const QString& address, qint64 amount) +{ + CTxDestination dest = CBitcoinAddress(address.toStdString()).Get(); + CScript script; script.SetDestination(dest); + CTxOut txOut(amount, script); + return txOut.IsDust(CTransaction::nMinRelayTxFee); +} + QString HtmlEscape(const QString& str, bool fMultiLine) { #if QT_VERSION < 0x050000 |