Bitcoin ABC  0.29.2
P2P Digital Currency
transaction.h
Go to the documentation of this file.
1 // Copyright (c) 2017-2019 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_NODE_TRANSACTION_H
6 #define BITCOIN_NODE_TRANSACTION_H
7 
8 #include <feerate.h>
10 #include <util/error.h>
11 
12 struct BlockHash;
13 class CBlockIndex;
14 class Config;
15 class CTxMemPool;
16 struct TxId;
17 
18 namespace Consensus {
19 struct Params;
20 }
21 
22 namespace node {
23 struct NodeContext;
24 
33 
55 [[nodiscard]] TransactionError
56 BroadcastTransaction(const NodeContext &node, CTransactionRef tx,
57  std::string &err_string, Amount max_tx_fee, bool relay,
58  bool wait_callback);
59 
76 CTransactionRef GetTransaction(const CBlockIndex *const block_index,
77  const CTxMemPool *const mempool,
78  const TxId &txid,
79  const Consensus::Params &consensusParams,
80  BlockHash &hashBlock);
81 } // namespace node
82 
83 #endif // BITCOIN_NODE_TRANSACTION_H
static constexpr Amount COIN
Definition: amount.h:144
const CChainParams & Params()
Return the currently selected parameters.
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: blockindex.h:26
Fee rate in satoshis per kilobyte: Amount / kB.
Definition: feerate.h:21
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Definition: txmempool.h:209
Definition: config.h:17
TransactionError
Definition: error.h:22
Definition: init.h:28
CTransactionRef GetTransaction(const CBlockIndex *const block_index, const CTxMemPool *const mempool, const TxId &txid, const Consensus::Params &consensusParams, BlockHash &hashBlock)
Return transaction with a given txid.
TransactionError BroadcastTransaction(const NodeContext &node, const CTransactionRef tx, std::string &err_string, const Amount max_tx_fee, bool relay, bool wait_callback)
Submit a transaction to the mempool and (optionally) relay it to all P2P peers.
Definition: transaction.cpp:37
static const CFeeRate DEFAULT_MAX_RAW_TX_FEE_RATE
Maximum fee rate for sendrawtransaction and testmempoolaccept RPC calls.
Definition: transaction.h:32
std::shared_ptr< const CTransaction > CTransactionRef
Definition: transaction.h:315
Definition: amount.h:19
A BlockHash is a unqiue identifier for a block.
Definition: blockhash.h:13
Parameters that influence chain consensus.
Definition: params.h:34
A TxId is the identifier of a transaction.
Definition: txid.h:14