Inside Bitcoin
Opening the selected file…
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1// Copyright (c) 2010-present The Bitcoin Core developers2// Distributed under the MIT software license, see the accompanying3// file COPYING or http://www.opensource.org/licenses/mit-license.php.5//! @file node/types.h is a home for public enum and struct type definitions6//! that are used internally by node code, but also used externally by wallet,7//! mining or GUI code.8//!9//! This file is intended to define only simple types that do not have external10//! dependencies. More complicated types should be defined in dedicated header11//! files.13#ifndef BITCOIN_NODE_TYPES_H14#define BITCOIN_NODE_TYPES_H16#include <cstdint>18namespace node {19enum class TransactionError {20OK, //!< No error21MISSING_INPUTS,22ALREADY_IN_UTXO_SET,23MEMPOOL_REJECTED,24MEMPOOL_ERROR,25MAX_FEE_EXCEEDED,26MAX_BURN_EXCEEDED,27INVALID_PACKAGE,28PRIVATE_BROADCAST_FULL,29};31/**32* How to broadcast a local transaction.33* Used to influence `BroadcastTransaction()` and its callers.34*/35enum class TxBroadcast : uint8_t {36/// Add the transaction to the mempool and broadcast to all peers for which tx relay is enabled.37MEMPOOL_AND_BROADCAST_TO_ALL,38/// Add the transaction to the mempool, but don't broadcast to anybody.39MEMPOOL_NO_BROADCAST,40/// Omit the mempool and directly send the transaction via a few dedicated connections to41/// peers on privacy networks.42NO_MEMPOOL_PRIVATE_BROADCAST,43};45} // namespace node47#endif // BITCOIN_NODE_TYPES_H