diff options
Diffstat (limited to 'src/node/transaction.h')
-rw-r--r-- | src/node/transaction.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/node/transaction.h b/src/node/transaction.h new file mode 100644 index 0000000000..51033f94e5 --- /dev/null +++ b/src/node/transaction.h @@ -0,0 +1,24 @@ +// Copyright (c) 2017-2019 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef BITCOIN_NODE_TRANSACTION_H +#define BITCOIN_NODE_TRANSACTION_H + +#include <attributes.h> +#include <primitives/transaction.h> +#include <uint256.h> +#include <util/error.h> + +/** + * Broadcast a transaction + * + * @param[in] tx the transaction to broadcast + * @param[out] &txid the txid of the transaction, if successfully broadcast + * @param[out] &err_string reference to std::string to fill with error string if available + * @param[in] highfee Reject txs with fees higher than this (if 0, accept any fee) + * return error + */ +NODISCARD TransactionError BroadcastTransaction(CTransactionRef tx, uint256& txid, std::string& err_string, const CAmount& highfee); + +#endif // BITCOIN_NODE_TRANSACTION_H |