Bitcoin ABC 0.30.5
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
12struct BlockHash;
13class CBlockIndex;
14class Config;
15class CTxMemPool;
16struct TxId;
17
18namespace Consensus {
19struct Params;
20}
21
22namespace node {
23class BlockManager;
24struct NodeContext;
25
34
56[[nodiscard]] TransactionError
57BroadcastTransaction(const NodeContext &node, CTransactionRef tx,
58 std::string &err_string, Amount max_tx_fee, bool relay,
59 bool wait_callback);
60
76CTransactionRef GetTransaction(const CBlockIndex *const block_index,
77 const CTxMemPool *const mempool,
78 const TxId &txid, BlockHash &hashBlock,
79 const BlockManager &blockman);
80} // namespace node
81
82#endif // BITCOIN_NODE_TRANSACTION_H
static constexpr Amount COIN
Definition: amount.h:144
const CChainParams & Params()
Return the currently selected parameters.
Definition: chainparams.cpp:19
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: blockindex.h:25
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:212
Definition: config.h:19
TransactionError
Definition: error.h:22
Definition: init.h:28
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
CTransactionRef GetTransaction(const CBlockIndex *const block_index, const CTxMemPool *const mempool, const TxId &txid, BlockHash &hashBlock, const BlockManager &blockman)
Return transaction with a given txid.
static const CFeeRate DEFAULT_MAX_RAW_TX_FEE_RATE
Maximum fee rate for sendrawtransaction and testmempoolaccept RPC calls.
Definition: transaction.h:33
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
A TxId is the identifier of a transaction.
Definition: txid.h:14