diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2019-07-18 12:06:23 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2019-07-18 12:06:23 -0400 |
commit | 4d94916f0dda535cb69b538ee4e3fffb5b033c87 (patch) | |
tree | 6999cb335efe0785b6635105c6649fa69031ad08 /src/interfaces/wallet.h | |
parent | e5abb59a9a66723dd1d9a01f65e467636eb24f2d (diff) |
Get rid of PendingWalletTx class.
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 code destructor
code that would return an unused key if the transaction wasn't committed.
Diffstat (limited to 'src/interfaces/wallet.h')
-rw-r--r-- | src/interfaces/wallet.h | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h index db47dbafaf..89e056b18b 100644 --- a/src/interfaces/wallet.h +++ b/src/interfaces/wallet.h @@ -34,7 +34,6 @@ struct CRecipient; namespace interfaces { class Handler; -class PendingWalletTx; struct WalletAddress; struct WalletBalances; struct WalletTx; @@ -134,13 +133,19 @@ public: virtual void listLockedCoins(std::vector<COutPoint>& outputs) = 0; //! Create transaction. - virtual std::unique_ptr<PendingWalletTx> createTransaction(const std::vector<CRecipient>& recipients, + virtual CTransactionRef createTransaction(const std::vector<CRecipient>& recipients, const CCoinControl& coin_control, bool sign, int& change_pos, CAmount& fee, std::string& fail_reason) = 0; + //! Commit transaction. + virtual bool commitTransaction(CTransactionRef tx, + WalletValueMap value_map, + WalletOrderForm order_form, + std::string& reject_reason) = 0; + //! Return whether transaction can be abandoned. virtual bool transactionCanBeAbandoned(const uint256& txid) = 0; @@ -288,21 +293,6 @@ public: virtual std::unique_ptr<Handler> handleCanGetAddressesChanged(CanGetAddressesChangedFn fn) = 0; }; -//! Tracking object returned by CreateTransaction and passed to CommitTransaction. -class PendingWalletTx -{ -public: - virtual ~PendingWalletTx() {} - - //! Get transaction data. - virtual const CTransaction& get() = 0; - - //! Send pending transaction and commit to wallet. - virtual bool commit(WalletValueMap value_map, - WalletOrderForm order_form, - std::string& reject_reason) = 0; -}; - //! Information about one wallet address. struct WalletAddress { |