Bitcoin Core Fuzz Coverage Report for wallet_tx_can_be_bumped

Coverage Report

Created: 2025-11-19 11:20

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/Users/brunogarcia/projects/bitcoin-core-dev/src/policy/feerate.cpp
Line
Count
Source
1
// Copyright (c) 2009-2010 Satoshi Nakamoto
2
// Copyright (c) 2009-present The Bitcoin Core developers
3
// Distributed under the MIT software license, see the accompanying
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6
#include <consensus/amount.h>
7
#include <policy/feerate.h>
8
#include <tinyformat.h>
9
10
11
CFeeRate::CFeeRate(const CAmount& nFeePaid, int32_t virtual_bytes)
12
0
{
13
0
    if (virtual_bytes > 0) {
14
0
        m_feerate = FeePerVSize(nFeePaid, virtual_bytes);
15
0
    } else {
16
0
        m_feerate = FeePerVSize();
17
0
    }
18
0
}
19
20
CAmount CFeeRate::GetFee(int32_t virtual_bytes) const
21
0
{
22
0
    Assume(virtual_bytes >= 0);
Line
Count
Source
125
0
#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
23
0
    if (m_feerate.IsEmpty()) { return CAmount(0);}
24
0
    CAmount nFee = CAmount(m_feerate.EvaluateFeeUp(virtual_bytes));
25
0
    if (nFee == 0 && virtual_bytes != 0 && m_feerate.fee < 0) return CAmount(-1);
26
0
    return nFee;
27
0
}
28
29
std::string CFeeRate::ToString(const FeeEstimateMode& fee_estimate_mode) const
30
0
{
31
0
    const CAmount feerate_per_kvb = GetFeePerK();
32
0
    switch (fee_estimate_mode) {
33
0
    case FeeEstimateMode::SAT_VB: return strprintf("%d.%03d %s/vB", feerate_per_kvb / 1000, feerate_per_kvb % 1000, CURRENCY_ATOM);
Line
Count
Source
1172
0
#define strprintf tfm::format
34
0
    default:                      return strprintf("%d.%08d %s/kvB", feerate_per_kvb / COIN, feerate_per_kvb % COIN, CURRENCY_UNIT);
Line
Count
Source
1172
0
#define strprintf tfm::format
35
0
    }
36
0
}