diff options
author | John Newbery <john@johnnewbery.com> | 2019-04-03 17:51:23 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2019-10-18 09:26:32 -0400 |
commit | b6f486a02b463ffeaf82ec11fc6f74f439c037ae (patch) | |
tree | b74abe8df6f3422d5b28c0633dd3979c5aacea66 /src/wallet | |
parent | 8bba91b22d22a8dfea7c947b542b1022bfc1c0ea (diff) |
[wallet] Add doxygen comment to CWallet::CommitTransaction()
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet.cpp | 3 | ||||
-rw-r--r-- | src/wallet/wallet.h | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index f77c413593..a9ea56b6ab 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3286,9 +3286,6 @@ bool CWallet::CreateTransaction(interfaces::Chain::Lock& locked_chain, const std return true; } -/** - * Call after CreateTransaction unless you want to abort - */ bool CWallet::CommitTransaction(CTransactionRef tx, mapValue_t mapValue, std::vector<std::pair<std::string, std::string>> orderForm, CValidationState& state) { auto locked_chain = chain().lock(); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 006775e83b..d12c6077bf 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1147,6 +1147,16 @@ public: */ bool CreateTransaction(interfaces::Chain::Lock& locked_chain, const std::vector<CRecipient>& vecSend, CTransactionRef& tx, CAmount& nFeeRet, int& nChangePosInOut, std::string& strFailReason, const CCoinControl& coin_control, bool sign = true); + /** + * Submit the transaction to the node's mempool and then relay to peers. + * Should be called after CreateTransaction unless you want to abort + * broadcasting the transaction. + * + * @param tx[in] The transaction to be broadcast. + * @param mapValue[in] key-values to be set on the transaction. + * @param orderForm[in] BIP 70 / BIP 21 order form details to be set on the transaction. + * @param state[in,out] CValidationState object returning information about whether the transaction was accepted + */ bool CommitTransaction(CTransactionRef tx, mapValue_t mapValue, std::vector<std::pair<std::string, std::string>> orderForm, CValidationState& state); bool DummySignTx(CMutableTransaction &txNew, const std::set<CTxOut> &txouts, bool use_max_sig = false) const |