diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2017-02-02 15:30:03 -0500 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2018-03-07 21:12:47 -0500 |
commit | a128bdc9e15dec5cd9aed1e4922c938edf31eb9a (patch) | |
tree | de47f034c0d08e96d53b0190d34ba48cceeccaf6 /src/wallet/wallet.h | |
parent | 29fad97c320c892ab6a480c81e2078ec22ab354b (diff) | |
download | bitcoin-a128bdc9e15dec5cd9aed1e4922c938edf31eb9a.tar.xz |
[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/wallet/wallet.h')
-rw-r--r-- | src/wallet/wallet.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 3e2d1794d8..cdb0def2e8 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -974,9 +974,9 @@ public: * selected by SelectCoins(); Also create the change output, when needed * @note passing nChangePosInOut as -1 will result in setting a random position */ - bool CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, int& nChangePosInOut, + bool CreateTransaction(const std::vector<CRecipient>& vecSend, CTransactionRef& tx, CReserveKey& reservekey, CAmount& nFeeRet, int& nChangePosInOut, std::string& strFailReason, const CCoinControl& coin_control, bool sign = true); - bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, CConnman* connman, CValidationState& state); + bool CommitTransaction(CTransactionRef tx, mapValue_t mapValue, std::vector<std::pair<std::string, std::string>> orderForm, std::string fromAccount, CReserveKey& reservekey, CConnman* connman, CValidationState& state); void ListAccountCreditDebit(const std::string& strAccount, std::list<CAccountingEntry>& entries); bool AddAccountingEntry(const CAccountingEntry&); |