LCOV - code coverage report
Current view: top level - src/kernel - mempool_removal_reason.cpp (source / functions) Coverage Total Hit
Test: test_bitcoin_coverage.info Lines: 66.7 % 9 6
Test Date: 2024-08-28 04:44:32 Functions: 100.0 % 1 1
Branches: 57.1 % 7 4

             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 <cassert>
       8                 :             : #include <string>
       9                 :             : 
      10                 :         204 : std::string RemovalReasonToString(const MemPoolRemovalReason& r) noexcept
      11                 :             : {
      12   [ -  +  +  -  :         204 :     switch (r) {
                +  +  - ]
      13                 :           0 :         case MemPoolRemovalReason::EXPIRY: return "expiry";
      14                 :          20 :         case MemPoolRemovalReason::SIZELIMIT: return "sizelimit";
      15                 :         132 :         case MemPoolRemovalReason::REORG: return "reorg";
      16                 :           0 :         case MemPoolRemovalReason::BLOCK: return "block";
      17                 :           4 :         case MemPoolRemovalReason::CONFLICT: return "conflict";
      18                 :          48 :         case MemPoolRemovalReason::REPLACED: return "replaced";
      19                 :             :     }
      20                 :           0 :     assert(false);
      21                 :             : }
        

Generated by: LCOV version 2.0-1