aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletmodeltransaction.h
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-02-02 15:30:03 -0500
committerRussell Yanofsky <russ@yanofsky.org>2018-03-07 21:12:47 -0500
commita128bdc9e15dec5cd9aed1e4922c938edf31eb9a (patch)
treede47f034c0d08e96d53b0190d34ba48cceeccaf6 /src/qt/walletmodeltransaction.h
parent29fad97c320c892ab6a480c81e2078ec22ab354b (diff)
[wallet] Construct CWalletTx objects in CommitTransaction
Construct CWalletTx objects in CWallet::CommitTransaction, instead of having callers do it. This ensures CWalletTx objects are constructed in a uniform way and all fields are set. This also makes it possible to avoid confusing and wasteful CWalletTx copies in https://github.com/bitcoin/bitcoin/pull/9381 There is no change in behavior.
Diffstat (limited to 'src/qt/walletmodeltransaction.h')
-rw-r--r--src/qt/walletmodeltransaction.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qt/walletmodeltransaction.h b/src/qt/walletmodeltransaction.h
index cd531dba4b..931e960d18 100644
--- a/src/qt/walletmodeltransaction.h
+++ b/src/qt/walletmodeltransaction.h
@@ -20,11 +20,10 @@ class WalletModelTransaction
{
public:
explicit WalletModelTransaction(const QList<SendCoinsRecipient> &recipients);
- ~WalletModelTransaction();
QList<SendCoinsRecipient> getRecipients() const;
- CWalletTx *getTransaction() const;
+ CTransactionRef& getTransaction();
unsigned int getTransactionSize();
void setTransactionFee(const CAmount& newFee);
@@ -39,7 +38,7 @@ public:
private:
QList<SendCoinsRecipient> recipients;
- CWalletTx *walletTransaction;
+ CTransactionRef walletTransaction;
std::unique_ptr<CReserveKey> keyChange;
CAmount fee;
};