Bitcoin
Functions
transaction.h File Reference
#include <attributes.h>
#include <primitives/transaction.h>
#include <uint256.h>
#include <util/error.h>

Go to the source code of this file.

Functions

NODISCARD TransactionError BroadcastTransaction (CTransactionRef tx, uint256 &txid, std::string &err_string, const CAmount &highfee)
 

Function Documentation

◆ BroadcastTransaction()

NODISCARD TransactionError BroadcastTransaction ( CTransactionRef  tx,
uint256 txid,
std::string &  err_string,
const CAmount highfee 
)

Broadcast a transaction

Parameters
[in]txthe transaction to broadcast
[out]&txidthe txid of the transaction, if successfully broadcast
[out]&err_stringreference to std::string to fill with error string if available
[in]highfeeReject txs with fees higher than this (if 0, accept any fee) return error