aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2014-09-11 19:15:29 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2014-09-16 19:14:32 +0200
commit0be990ba34110184c8a5a2c04094311dab5cd84c (patch)
tree2eb24931c396ae0dc0c57fee42f345c581bd58c6 /src/qt
parentab3834baae2e48708de2be74217eaf9da9081fc3 (diff)
Move CTxDestination from script/script to script/standard
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/guiutil.cpp4
-rw-r--r--src/qt/paymentserver.cpp4
-rw-r--r--src/qt/walletmodel.cpp3
3 files changed, 6 insertions, 5 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 304177ee11..fc22871a6b 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -13,6 +13,8 @@
#include "init.h"
#include "main.h"
#include "protocol.h"
+#include "script/script.h"
+#include "script/standard.h"
#include "util.h"
#ifdef WIN32
@@ -222,7 +224,7 @@ QString formatBitcoinURI(const SendCoinsRecipient &info)
bool isDust(const QString& address, qint64 amount)
{
CTxDestination dest = CBitcoinAddress(address.toStdString()).Get();
- CScript script; script.SetDestination(dest);
+ CScript script = GetScriptForDestination(dest);
CTxOut txOut(amount, script);
return txOut.IsDust(::minRelayTxFee);
}
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 219a685faf..cc4478f39f 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -609,7 +609,7 @@ void PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipien
std::string strAccount = account.toStdString();
set<CTxDestination> refundAddresses = wallet->GetAccountAddresses(strAccount);
if (!refundAddresses.empty()) {
- CScript s; s.SetDestination(*refundAddresses.begin());
+ CScript s = GetScriptForDestination(*refundAddresses.begin());
payments::Output* refund_to = payment.add_refund_to();
refund_to->set_script(&s[0], s.size());
}
@@ -620,7 +620,7 @@ void PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipien
CKeyID keyID = newKey.GetID();
wallet->SetAddressBook(keyID, strAccount, "refund");
- CScript s; s.SetDestination(keyID);
+ CScript s = GetScriptForDestination(keyID);
payments::Output* refund_to = payment.add_refund_to();
refund_to->set_script(&s[0], s.size());
}
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 8d2c2e96d8..ed90914ba7 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -241,8 +241,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
setAddress.insert(rcp.address);
++nAddresses;
- CScript scriptPubKey;
- scriptPubKey.SetDestination(CBitcoinAddress(rcp.address.toStdString()).Get());
+ CScript scriptPubKey = GetScriptForDestination(CBitcoinAddress(rcp.address.toStdString()).Get());
vecSend.push_back(std::pair<CScript, int64_t>(scriptPubKey, rcp.amount));
total += rcp.amount;