forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtypes.h
More file actions
46 lines (39 loc) · 1.43 KB
/
Copy pathtypes.h
File metadata and controls
46 lines (39 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright (c) 2010-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
//! @file node/types.h is a home for public enum and struct type definitions
//! that are used internally by node code, but also used externally by wallet,
//! mining or GUI code.
//!
//! This file is intended to define only simple types that do not have external
//! dependencies. More complicated types should be defined in dedicated header
//! files.
#ifndef BITCOIN_NODE_TYPES_H
#define BITCOIN_NODE_TYPES_H
#include <cstdint>
namespace node {
enum class TransactionError {
OK, //!< No error
MISSING_INPUTS,
ALREADY_IN_UTXO_SET,
MEMPOOL_REJECTED,
MEMPOOL_ERROR,
MAX_FEE_EXCEEDED,
MAX_BURN_EXCEEDED,
INVALID_PACKAGE,
};
/**
* How to broadcast a local transaction.
* Used to influence `BroadcastTransaction()` and its callers.
*/
enum class TxBroadcast : uint8_t {
/// Add the transaction to the mempool and broadcast to all peers for which tx relay is enabled.
MEMPOOL_AND_BROADCAST_TO_ALL,
/// Add the transaction to the mempool, but don't broadcast to anybody.
MEMPOOL_NO_BROADCAST,
/// Omit the mempool and directly send the transaction via a few dedicated connections to
/// peers on privacy networks.
NO_MEMPOOL_PRIVATE_BROADCAST,
};
} // namespace node
#endif // BITCOIN_NODE_TYPES_H