/bitcoin/src/kernel/mempool_removal_reason.cpp
Line | Count | Source |
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 <cassert> |
8 | | #include <string> |
9 | | |
10 | | std::string RemovalReasonToString(const MemPoolRemovalReason& r) noexcept |
11 | 22.4k | { |
12 | 22.4k | switch (r) { Branch (12:13): [True: 18.4E, False: 22.4k]
|
13 | 7.53k | case MemPoolRemovalReason::EXPIRY: return "expiry"; Branch (13:9): [True: 7.53k, False: 14.9k]
|
14 | 950 | case MemPoolRemovalReason::SIZELIMIT: return "sizelimit"; Branch (14:9): [True: 950, False: 21.5k]
|
15 | 684 | case MemPoolRemovalReason::REORG: return "reorg"; Branch (15:9): [True: 684, False: 21.7k]
|
16 | 0 | case MemPoolRemovalReason::BLOCK: return "block"; Branch (16:9): [True: 0, False: 22.4k]
|
17 | 2.88k | case MemPoolRemovalReason::CONFLICT: return "conflict"; Branch (17:9): [True: 2.88k, False: 19.5k]
|
18 | 10.4k | case MemPoolRemovalReason::REPLACED: return "replaced"; Branch (18:9): [True: 10.4k, False: 12.0k]
|
19 | 22.4k | } |
20 | 22.4k | assert(false); Branch (20:5): [Folded - Ignored]
|
21 | 0 | } |