Bitcoin Core  22.99.0
P2P Digital Currency
transaction.h
Go to the documentation of this file.
1 // Copyright (c) 2017-2020 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 <attributes.h>
9 #include <policy/feerate.h>
10 #include <primitives/transaction.h>
11 #include <util/error.h>
12 
13 class CBlockIndex;
14 class CTxMemPool;
15 struct NodeContext;
16 namespace Consensus {
17 struct Params;
18 }
19 
26 
44 [[nodiscard]] TransactionError BroadcastTransaction(NodeContext& node, CTransactionRef tx, std::string& err_string, const CAmount& max_tx_fee, bool relay, bool wait_callback);
45 
59 CTransactionRef GetTransaction(const CBlockIndex* const block_index, const CTxMemPool* const mempool, const uint256& hash, const Consensus::Params& consensusParams, uint256& hashBlock);
60 
61 #endif // BITCOIN_NODE_TRANSACTION_H
feerate.h
transaction.h
CTxMemPool
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Definition: txmempool.h:478
DEFAULT_MAX_RAW_TX_FEE_RATE
static const CFeeRate DEFAULT_MAX_RAW_TX_FEE_RATE
Maximum fee rate for sendrawtransaction and testmempoolaccept RPC calls.
Definition: transaction.h:25
CTransactionRef
std::shared_ptr< const CTransaction > CTransactionRef
Definition: transaction.h:386
CFeeRate
Fee rate in satoshis per kilobyte: CAmount / kB.
Definition: feerate.h:29
Consensus::Params
Parameters that influence chain consensus.
Definition: params.h:70
TransactionError
TransactionError
Definition: error.h:22
Consensus
Transaction validation functions.
Definition: params.h:12
CAmount
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
error.h
BroadcastTransaction
TransactionError BroadcastTransaction(NodeContext &node, CTransactionRef tx, std::string &err_string, const CAmount &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:32
uint256
256-bit opaque blob.
Definition: uint256.h:124
attributes.h
Params
const CChainParams & Params()
Return the currently selected parameters.
Definition: chainparams.cpp:536
node
Definition: interfaces.cpp:68
COIN
static const CAmount COIN
Definition: amount.h:14
NodeContext
NodeContext struct containing references to chain state and connection state.
Definition: context.h:39
CBlockIndex
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: chain.h:137
GetTransaction
CTransactionRef GetTransaction(const CBlockIndex *const block_index, const CTxMemPool *const mempool, const uint256 &hash, const Consensus::Params &consensusParams, uint256 &hashBlock)
Return transaction with a given hash.
Definition: transaction.cpp:126