Bitcoin Core 30.99.0
P2P Digital Currency
types.h
Go to the documentation of this file.
1// Copyright (c) 2010-2021 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
12
13#ifndef BITCOIN_NODE_TYPES_H
14#define BITCOIN_NODE_TYPES_H
15
16#include <consensus/amount.h>
17#include <cstddef>
18#include <cstdint>
19#include <policy/policy.h>
20#include <script/script.h>
21#include <uint256.h>
22#include <util/time.h>
23
24namespace node {
25enum class TransactionError {
26 OK,
27 MISSING_INPUTS,
34};
35
40 bool use_mempool{true};
67};
68
74 MillisecondsDouble timeout{MillisecondsDouble::max()};
75
88};
89
95
99 bool check_pow{true};
100};
101
106enum class TxBroadcast : uint8_t {
111};
112
113} // namespace node
114
115#endif // BITCOIN_NODE_TYPES_H
static constexpr CAmount MAX_MONEY
No amount larger than this (in satoshi) is valid.
Definition: amount.h:26
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:413
Definition: messages.h:21
TxBroadcast
How to broadcast a local transaction.
Definition: types.h:106
@ MEMPOOL_AND_BROADCAST_TO_ALL
Add the transaction to the mempool and broadcast to all peers for which tx relay is enabled.
@ MEMPOOL_NO_BROADCAST
Add the transaction to the mempool, but don't broadcast to anybody.
TransactionError
Definition: types.h:25
static constexpr unsigned int DEFAULT_BLOCK_RESERVED_WEIGHT
Default for -blockreservedweight.
Definition: policy.h:25
@ OP_TRUE
Definition: script.h:84
@ OK
The message verification was successful.
bool check_pow
Set false to omit the proof-of-work check.
Definition: types.h:99
bool check_merkle_root
Set false to omit the merkle root check.
Definition: types.h:94
size_t block_reserved_weight
The default reserved weight for the fixed-size block header, transaction count and coinbase transacti...
Definition: types.h:45
CScript coinbase_output_script
Script to put in the coinbase transaction.
Definition: types.h:66
bool use_mempool
Set false to omit mempool transactions.
Definition: types.h:40
size_t coinbase_output_max_additional_sigops
The maximum additional sigops which the pool will add in coinbase transaction outputs.
Definition: types.h:50
MillisecondsDouble timeout
How long to wait before returning nullptr instead of a new template.
Definition: types.h:74
CAmount fee_threshold
The wait method will not return a new template unless it has fees at least fee_threshold sats higher ...
Definition: types.h:87
std::chrono::duration< double, std::chrono::milliseconds::period > MillisecondsDouble
Definition: time.h:88