Branch data Line data Source code
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 : :
5 : : #include <kernel/mempool_removal_reason.h>
6 : :
7 : : #include <util/check.h>
8 : :
9 : : #include <string>
10 : :
11 : 2193 : std::string RemovalReasonToString(const MemPoolRemovalReason& r) noexcept
12 : : {
13 [ + + + - : 2193 : switch (r) {
+ + - ]
14 : 24 : case MemPoolRemovalReason::EXPIRY: return "expiry";
15 : 53 : case MemPoolRemovalReason::SIZELIMIT: return "sizelimit";
16 : 92 : case MemPoolRemovalReason::REORG: return "reorg";
17 : 0 : case MemPoolRemovalReason::BLOCK: return "block";
18 : 420 : case MemPoolRemovalReason::CONFLICT: return "conflict";
19 : 1604 : case MemPoolRemovalReason::REPLACED: return "replaced";
20 : : }
21 : 0 : AssertUnreachable();
22 : : }
|