Bitcoin Core 28.99.0
P2P Digital Currency
mempool_removal_reason.cpp
Go to the documentation of this file.
1// Copyright (c) 2016-present The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or https://opensource.org/license/mit/.
4
6
7#include <cassert>
8#include <string>
9
10std::string RemovalReasonToString(const MemPoolRemovalReason& r) noexcept
11{
12 switch (r) {
13 case MemPoolRemovalReason::EXPIRY: return "expiry";
14 case MemPoolRemovalReason::SIZELIMIT: return "sizelimit";
15 case MemPoolRemovalReason::REORG: return "reorg";
16 case MemPoolRemovalReason::BLOCK: return "block";
17 case MemPoolRemovalReason::CONFLICT: return "conflict";
18 case MemPoolRemovalReason::REPLACED: return "replaced";
19 }
20 assert(false);
21}
std::string RemovalReasonToString(const MemPoolRemovalReason &r) noexcept
MemPoolRemovalReason
Reason why a transaction was removed from the mempool, this is passed to the notification signal.
@ SIZELIMIT
Removed in size limiting.
@ BLOCK
Removed for block.
@ EXPIRY
Expired from mempool.
@ REPLACED
Removed for replacement.
@ CONFLICT
Removed for conflict with in-block transaction.
@ REORG
Removed for reorganization.
assert(!tx.IsCoinBase())