diff options
author | MeshCollider <dobsonsa68@gmail.com> | 2019-07-27 22:35:13 +1200 |
---|---|---|
committer | MeshCollider <dobsonsa68@gmail.com> | 2019-07-27 22:35:32 +1200 |
commit | 1139e3cb76202d484cf31ed6889b3a01c72cdfdd (patch) | |
tree | 2c22fa9b37a4ce331d5af205c1843fa1206160d5 /src/qt/walletmodeltransaction.cpp | |
parent | dfb7fd60f261ad0aee0d2b70f8b3664826463f3a (diff) | |
parent | 4d94916f0dda535cb69b538ee4e3fffb5b033c87 (diff) | |
download | bitcoin-1139e3cb76202d484cf31ed6889b3a01c72cdfdd.tar.xz |
Merge #16415: Get rid of PendingWalletTx class
4d94916f0dda535cb69b538ee4e3fffb5b033c87 Get rid of PendingWalletTx class. (Russell Yanofsky)
Pull request description:
No reason for this class to exist if it doesn't have any code to run in the destructor. e10e1e8db043e9b7c113e07faf408f337c1b732d from https://github.com/bitcoin/bitcoin/pull/16208 recently removed the destructor code that would return an unused key if the transaction wasn't committed.
This is just cleanup, there's no change in behavior.
ACKs for top commit:
ariard:
utACK 4d94916. Successfully built both `bitcoind` and `bitcoin-qt`. `PendingWalletTx` was only a wrapper to enforce call to `ReturnDestination` if `CommitTransaction` doesn't `KeepDestination` before.
promag:
ACK 4d94916f0dda535cb69b538ee4e3fffb5b033c87, refactor looks good to me.
meshcollider:
utACK 4d94916f0dda535cb69b538ee4e3fffb5b033c87
Tree-SHA512: f3f93d2f2f5d8f1e7810d609d881c1b1cbbaa8629f483f4293e20b3210292605e947bc4903fde9d2d8736277ca3bd6de182f7eac1e13515d5a327f2ebc130839
Diffstat (limited to 'src/qt/walletmodeltransaction.cpp')
-rw-r--r-- | src/qt/walletmodeltransaction.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qt/walletmodeltransaction.cpp b/src/qt/walletmodeltransaction.cpp index 8c0dc276b0..d00ccf70d9 100644 --- a/src/qt/walletmodeltransaction.cpp +++ b/src/qt/walletmodeltransaction.cpp @@ -21,14 +21,14 @@ QList<SendCoinsRecipient> WalletModelTransaction::getRecipients() const return recipients; } -std::unique_ptr<interfaces::PendingWalletTx>& WalletModelTransaction::getWtx() +CTransactionRef& WalletModelTransaction::getWtx() { return wtx; } unsigned int WalletModelTransaction::getTransactionSize() { - return wtx ? GetVirtualTransactionSize(wtx->get()) : 0; + return wtx ? GetVirtualTransactionSize(*wtx) : 0; } CAmount WalletModelTransaction::getTransactionFee() const @@ -43,7 +43,7 @@ void WalletModelTransaction::setTransactionFee(const CAmount& newFee) void WalletModelTransaction::reassignAmounts(int nChangePosRet) { - const CTransaction* walletTransaction = &wtx->get(); + const CTransaction* walletTransaction = wtx.get(); int i = 0; for (QList<SendCoinsRecipient>::iterator it = recipients.begin(); it != recipients.end(); ++it) { |