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.
Synopsis
Declared in <wallet/wallet.h>
void
CommitTransaction(
CTransactionRef tx,
std::optional<Txid> replaces_txid = std::nullopt,
std::optional<std::string> comment = std::nullopt,
std::optional<std::string> comment_to = std::nullopt,
std::vector<std::string> const& messages = {},
std::vector<std::string> const& payment_requests = {});
Parameters
Name |
Description |
tx [in] |
The transaction to be broadcast. |
replaces_txid [in] |
The txid of the transaction that this transaction replaces |
comment [in] |
The user's comment for this transaction |
comment_to [in] |
The comment for this transaction indicating where coins are sent to |
messages [in] |
The BIP 21 URI messages to attach to this transaction |
payment_requests [in] |
The serialized BIP 70 payment requests to attach to this transaction |
Created with MrDocs