Skip to content

Commit b6f486a

Browse files
committed
[wallet] Add doxygen comment to CWallet::CommitTransaction()
1 parent 8bba91b commit b6f486a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/wallet/wallet.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3286,9 +3286,6 @@ bool CWallet::CreateTransaction(interfaces::Chain::Lock& locked_chain, const std
32863286
return true;
32873287
}
32883288

3289-
/**
3290-
* Call after CreateTransaction unless you want to abort
3291-
*/
32923289
bool CWallet::CommitTransaction(CTransactionRef tx, mapValue_t mapValue, std::vector<std::pair<std::string, std::string>> orderForm, CValidationState& state)
32933290
{
32943291
auto locked_chain = chain().lock();

src/wallet/wallet.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,16 @@ class CWallet final : public FillableSigningProvider, private interfaces::Chain:
11471147
*/
11481148
bool CreateTransaction(interfaces::Chain::Lock& locked_chain, const std::vector<CRecipient>& vecSend, CTransactionRef& tx, CAmount& nFeeRet, int& nChangePosInOut,
11491149
std::string& strFailReason, const CCoinControl& coin_control, bool sign = true);
1150+
/**
1151+
* Submit the transaction to the node's mempool and then relay to peers.
1152+
* Should be called after CreateTransaction unless you want to abort
1153+
* broadcasting the transaction.
1154+
*
1155+
* @param tx[in] The transaction to be broadcast.
1156+
* @param mapValue[in] key-values to be set on the transaction.
1157+
* @param orderForm[in] BIP 70 / BIP 21 order form details to be set on the transaction.
1158+
* @param state[in,out] CValidationState object returning information about whether the transaction was accepted
1159+
*/
11501160
bool CommitTransaction(CTransactionRef tx, mapValue_t mapValue, std::vector<std::pair<std::string, std::string>> orderForm, CValidationState& state);
11511161

11521162
bool DummySignTx(CMutableTransaction &txNew, const std::set<CTxOut> &txouts, bool use_max_sig = false) const

0 commit comments

Comments
 (0)