From b6f486a02b463ffeaf82ec11fc6f74f439c037ae Mon Sep 17 00:00:00 2001 From: John Newbery Date: Wed, 3 Apr 2019 17:51:23 -0400 Subject: [PATCH] [wallet] Add doxygen comment to CWallet::CommitTransaction() --- src/wallet/wallet.cpp | 3 --- 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 f77c413593f..a9ea56b6ab1 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> orderForm, CValidationState& state) { auto locked_chain = chain().lock(); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 006775e83bd..d12c6077bf5 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& 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> orderForm, CValidationState& state); bool DummySignTx(CMutableTransaction &txNew, const std::set &txouts, bool use_max_sig = false) const