Coverage Report

Created: 2026-05-06 07:53

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/tmp/bitcoin/src/util/check.h
Line
Count
Source
1
// Copyright (c) 2019-present The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#ifndef BITCOIN_UTIL_CHECK_H
6
#define BITCOIN_UTIL_CHECK_H
7
8
#include <attributes.h>
9
10
#include <atomic>
11
// We use `util/check.h` to provide the `assert()` macro
12
// to ensure that `NDEBUG` is not defined.
13
#include <cassert> // IWYU pragma: export
14
#include <source_location>
15
#include <stdexcept>
16
#include <string>
17
#include <string_view>
18
#include <type_traits>
19
#include <utility>
20
21
constexpr bool G_FUZZING_BUILD{
22
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
23
    true
24
#else
25
    false
26
#endif
27
};
28
constexpr bool G_ABORT_ON_FAILED_ASSUME{G_FUZZING_BUILD ||
29
#ifdef ABORT_ON_FAILED_ASSUME
30
    true
31
#else
32
    false
33
#endif
34
};
35
36
extern std::atomic<bool> g_enable_dynamic_fuzz_determinism;
37
38
inline bool EnableFuzzDeterminism()
39
2.20M
{
40
    if constexpr (G_FUZZING_BUILD) {
41
        return true;
42
    } else if constexpr (!G_ABORT_ON_FAILED_ASSUME) {
43
        // Running fuzz tests is always disabled if Assume() doesn't abort
44
        // (ie, non-fuzz non-debug builds), as otherwise tests which
45
        // should fail due to a failing Assume may still pass. As such,
46
        // we also statically disable fuzz determinism in that case.
47
        return false;
48
2.20M
    } else {
49
2.20M
        return g_enable_dynamic_fuzz_determinism;
50
2.20M
    }
51
2.20M
}
52
53
extern bool g_detail_test_only_CheckFailuresAreExceptionsNotAborts;
54
struct test_only_CheckFailuresAreExceptionsNotAborts {
55
2
    test_only_CheckFailuresAreExceptionsNotAborts() { g_detail_test_only_CheckFailuresAreExceptionsNotAborts = true; };
56
2
    ~test_only_CheckFailuresAreExceptionsNotAborts() { g_detail_test_only_CheckFailuresAreExceptionsNotAborts = false; };
57
};
58
59
std::string StrFormatInternalBug(std::string_view msg, const std::source_location& loc);
60
61
class NonFatalCheckError : public std::runtime_error
62
{
63
public:
64
    NonFatalCheckError(std::string_view msg, const std::source_location& loc);
65
};
66
67
/** Internal helper */
68
void assertion_fail(const std::source_location& loc, std::string_view assertion);
69
70
/** Helper for CHECK_NONFATAL() */
71
template <typename T>
72
T&& inline_check_non_fatal(LIFETIMEBOUND T&& val, const std::source_location& loc, std::string_view assertion)
73
247M
{
74
247M
    if (!val) {
75
9
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
9
            assertion_fail(loc, assertion);
77
9
        }
78
9
        throw NonFatalCheckError{assertion, loc};
79
9
    }
80
247M
    return std::forward<T>(val);
81
247M
}
bool const& inline_check_non_fatal<bool const&>(bool const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
103
{
74
103
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
103
    return std::forward<T>(val);
81
103
}
bool&& inline_check_non_fatal<bool>(bool&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
240M
{
74
240M
    if (!val) {
75
9
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
9
            assertion_fail(loc, assertion);
77
9
        }
78
9
        throw NonFatalCheckError{assertion, loc};
79
9
    }
80
240M
    return std::forward<T>(val);
81
240M
}
bool& inline_check_non_fatal<bool&>(bool&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
6.68M
{
74
6.68M
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
6.68M
    return std::forward<T>(val);
81
6.68M
}
CBlockIndex const*&& inline_check_non_fatal<CBlockIndex const*>(CBlockIndex const*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
142k
{
74
142k
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
142k
    return std::forward<T>(val);
81
142k
}
CBlockIndex const*& inline_check_non_fatal<CBlockIndex const*&>(CBlockIndex const*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
128
{
74
128
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
128
    return std::forward<T>(val);
81
128
}
std::unique_ptr<CCoinsViewCursor, std::default_delete<CCoinsViewCursor>>&& inline_check_non_fatal<std::unique_ptr<CCoinsViewCursor, std::default_delete<CCoinsViewCursor>>>(std::unique_ptr<CCoinsViewCursor, std::default_delete<CCoinsViewCursor>>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
1.08k
{
74
1.08k
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
1.08k
    return std::forward<T>(val);
81
1.08k
}
node::BlockManager*&& inline_check_non_fatal<node::BlockManager*>(node::BlockManager*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
11
{
74
11
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
11
    return std::forward<T>(val);
81
11
}
Unexecuted instantiation: std::shared_ptr<CTransaction const>&& inline_check_non_fatal<std::shared_ptr<CTransaction const>>(std::shared_ptr<CTransaction const>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
CBlockIndex*& inline_check_non_fatal<CBlockIndex*&>(CBlockIndex*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
2.08k
{
74
2.08k
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
2.08k
    return std::forward<T>(val);
81
2.08k
}
std::optional<interfaces::BlockRef>&& inline_check_non_fatal<std::optional<interfaces::BlockRef>>(std::optional<interfaces::BlockRef>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
2.10k
{
74
2.10k
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
2.10k
    return std::forward<T>(val);
81
2.10k
}
std::unique_ptr<ValidationSignals, std::default_delete<ValidationSignals>>& inline_check_non_fatal<std::unique_ptr<ValidationSignals, std::default_delete<ValidationSignals>>&>(std::unique_ptr<ValidationSignals, std::default_delete<ValidationSignals>>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
4.02k
{
74
4.02k
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
4.02k
    return std::forward<T>(val);
81
4.02k
}
CBlockIndex*&& inline_check_non_fatal<CBlockIndex*>(CBlockIndex*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
17.4k
{
74
17.4k
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
17.4k
    return std::forward<T>(val);
81
17.4k
}
CBlockIndex* const& inline_check_non_fatal<CBlockIndex* const&>(CBlockIndex* const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
11
{
74
11
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
11
    return std::forward<T>(val);
81
11
}
std::unique_ptr<node::Warnings, std::default_delete<node::Warnings>>& inline_check_non_fatal<std::unique_ptr<node::Warnings, std::default_delete<node::Warnings>>&>(std::unique_ptr<node::Warnings, std::default_delete<node::Warnings>>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
17.0k
{
74
17.0k
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
17.0k
    return std::forward<T>(val);
81
17.0k
}
std::optional<kernel::CCoinsStats>& inline_check_non_fatal<std::optional<kernel::CCoinsStats>&>(std::optional<kernel::CCoinsStats>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
37
{
74
37
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
37
    return std::forward<T>(val);
81
37
}
ValidationSignals* const& inline_check_non_fatal<ValidationSignals* const&>(ValidationSignals* const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
13.4k
{
74
13.4k
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
13.4k
    return std::forward<T>(val);
81
13.4k
}
std::unique_ptr<ValidationSignals, std::default_delete<ValidationSignals>> const& inline_check_non_fatal<std::unique_ptr<ValidationSignals, std::default_delete<ValidationSignals>> const&>(std::unique_ptr<ValidationSignals, std::default_delete<ValidationSignals>> const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
141
{
74
141
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
141
    return std::forward<T>(val);
81
141
}
std::unique_ptr<interfaces::BlockTemplate, std::default_delete<interfaces::BlockTemplate>>& inline_check_non_fatal<std::unique_ptr<interfaces::BlockTemplate, std::default_delete<interfaces::BlockTemplate>>&>(std::unique_ptr<interfaces::BlockTemplate, std::default_delete<interfaces::BlockTemplate>>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
36.4k
{
74
36.4k
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
36.4k
    return std::forward<T>(val);
81
36.4k
}
std::unique_ptr<CScheduler, std::default_delete<CScheduler>> const& inline_check_non_fatal<std::unique_ptr<CScheduler, std::default_delete<CScheduler>> const&>(std::unique_ptr<CScheduler, std::default_delete<CScheduler>> const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
12
{
74
12
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
12
    return std::forward<T>(val);
81
12
}
std::optional<CMutableTransaction>&& inline_check_non_fatal<std::optional<CMutableTransaction>>(std::optional<CMutableTransaction>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
44
{
74
44
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
44
    return std::forward<T>(val);
81
44
}
std::function<bool ()>& inline_check_non_fatal<std::function<bool ()>&>(std::function<bool ()>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
968
{
74
968
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
968
    return std::forward<T>(val);
81
968
}
wallet::DescriptorScriptPubKeyMan*& inline_check_non_fatal<wallet::DescriptorScriptPubKeyMan*&>(wallet::DescriptorScriptPubKeyMan*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
233
{
74
233
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
233
    return std::forward<T>(val);
81
233
}
JSONRPCRequest const*& inline_check_non_fatal<JSONRPCRequest const*&>(JSONRPCRequest const*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
34.4k
{
74
34.4k
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
34.4k
    return std::forward<T>(val);
81
34.4k
}
UniValue const*& inline_check_non_fatal<UniValue const*&>(UniValue const*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
31.7k
{
74
31.7k
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
31.7k
    return std::forward<T>(val);
81
31.7k
}
std::optional<arith_uint256>&& inline_check_non_fatal<std::optional<arith_uint256>>(std::optional<arith_uint256>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
73
20.5k
{
74
20.5k
    if (!val) {
75
0
        if constexpr (G_ABORT_ON_FAILED_ASSUME) {
76
0
            assertion_fail(loc, assertion);
77
0
        }
78
0
        throw NonFatalCheckError{assertion, loc};
79
0
    }
80
20.5k
    return std::forward<T>(val);
81
20.5k
}
82
83
#if defined(NDEBUG)
84
#error "Cannot compile without assertions!"
85
#endif
86
87
/** Helper for Assert()/Assume() */
88
template <bool IS_ASSERT, typename T>
89
constexpr T&& inline_assertion_check(LIFETIMEBOUND T&& val, [[maybe_unused]] const std::source_location& loc, [[maybe_unused]] std::string_view assertion)
90
2.28G
{
91
2.28G
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2.28G
        if (!val) {
93
2
            assertion_fail(loc, assertion);
94
2
        }
95
2.28G
    }
96
2.28G
    return std::forward<T>(val);
97
2.28G
}
bool&& inline_assertion_check<false, bool>(bool&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2.17G
{
91
2.17G
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2.17G
        if (!val) {
93
1
            assertion_fail(loc, assertion);
94
1
        }
95
2.17G
    }
96
2.17G
    return std::forward<T>(val);
97
2.17G
}
bool&& inline_assertion_check<true, bool>(bool&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
11.3M
{
91
11.3M
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
11.3M
        if (!val) {
93
1
            assertion_fail(loc, assertion);
94
1
        }
95
11.3M
    }
96
11.3M
    return std::forward<T>(val);
97
11.3M
}
std::unique_ptr<ChainstateManager, std::default_delete<ChainstateManager>>& inline_assertion_check<true, std::unique_ptr<ChainstateManager, std::default_delete<ChainstateManager>>&>(std::unique_ptr<ChainstateManager, std::default_delete<ChainstateManager>>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
926k
{
91
926k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
926k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
926k
    }
96
926k
    return std::forward<T>(val);
97
926k
}
std::unique_ptr<LevelDBContext, std::default_delete<LevelDBContext>> const& inline_assertion_check<true, std::unique_ptr<LevelDBContext, std::default_delete<LevelDBContext>> const&>(std::unique_ptr<LevelDBContext, std::default_delete<LevelDBContext>> const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
10.9M
{
91
10.9M
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
10.9M
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
10.9M
    }
96
10.9M
    return std::forward<T>(val);
97
10.9M
}
int&& inline_assertion_check<false, int>(int&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
41.0M
{
91
41.0M
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
41.0M
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
41.0M
    }
96
41.0M
    return std::forward<T>(val);
97
41.0M
}
unsigned char const& inline_assertion_check<false, unsigned char const&>(unsigned char const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
1.22M
{
91
1.22M
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
1.22M
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
1.22M
    }
96
1.22M
    return std::forward<T>(val);
97
1.22M
}
CCoinsView*& inline_assertion_check<true, CCoinsView*&>(CCoinsView*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
411k
{
91
411k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
411k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
411k
    }
96
411k
    return std::forward<T>(val);
97
411k
}
std::unique_ptr<CoinsViews, std::default_delete<CoinsViews>>& inline_assertion_check<true, std::unique_ptr<CoinsViews, std::default_delete<CoinsViews>>&>(std::unique_ptr<CoinsViews, std::default_delete<CoinsViews>>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2.05M
{
91
2.05M
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2.05M
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
2.05M
    }
96
2.05M
    return std::forward<T>(val);
97
2.05M
}
std::unique_ptr<CCoinsViewCache, std::default_delete<CCoinsViewCache>>& inline_assertion_check<true, std::unique_ptr<CCoinsViewCache, std::default_delete<CCoinsViewCache>>&>(std::unique_ptr<CCoinsViewCache, std::default_delete<CCoinsViewCache>>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2.05M
{
91
2.05M
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2.05M
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
2.05M
    }
96
2.05M
    return std::forward<T>(val);
97
2.05M
}
std::optional<arith_uint256> const& inline_assertion_check<true, std::optional<arith_uint256> const&>(std::optional<arith_uint256> const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
214k
{
91
214k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
214k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
214k
    }
96
214k
    return std::forward<T>(val);
97
214k
}
std::optional<uint256> const& inline_assertion_check<true, std::optional<uint256> const&>(std::optional<uint256> const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
160k
{
91
160k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
160k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
160k
    }
96
160k
    return std::forward<T>(val);
97
160k
}
std::unique_ptr<CTxMemPool, std::default_delete<CTxMemPool>>& inline_assertion_check<true, std::unique_ptr<CTxMemPool, std::default_delete<CTxMemPool>>&>(std::unique_ptr<CTxMemPool, std::default_delete<CTxMemPool>>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
24
{
91
24
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
24
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
24
    }
96
24
    return std::forward<T>(val);
97
24
}
std::optional<uint256>&& inline_assertion_check<true, std::optional<uint256>>(std::optional<uint256>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
131
{
91
131
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
131
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
131
    }
96
131
    return std::forward<T>(val);
97
131
}
std::function<bool ()>& inline_assertion_check<true, std::function<bool ()>&>(std::function<bool ()>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
1.27k
{
91
1.27k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
1.27k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
1.27k
    }
96
1.27k
    return std::forward<T>(val);
97
1.27k
}
std::unique_ptr<node::Warnings, std::default_delete<node::Warnings>>& inline_assertion_check<true, std::unique_ptr<node::Warnings, std::default_delete<node::Warnings>>&>(std::unique_ptr<node::Warnings, std::default_delete<node::Warnings>>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
1.27k
{
91
1.27k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
1.27k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
1.27k
    }
96
1.27k
    return std::forward<T>(val);
97
1.27k
}
util::SignalInterrupt*& inline_assertion_check<true, util::SignalInterrupt*&>(util::SignalInterrupt*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
80.3k
{
91
80.3k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
80.3k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
80.3k
    }
96
80.3k
    return std::forward<T>(val);
97
80.3k
}
node::ReadRawError*&& inline_assertion_check<true, node::ReadRawError*>(node::ReadRawError*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
14
{
91
14
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
14
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
14
    }
96
14
    return std::forward<T>(val);
97
14
}
unsigned long& inline_assertion_check<false, unsigned long&>(unsigned long&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
17.5M
{
91
17.5M
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
17.5M
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
17.5M
    }
96
17.5M
    return std::forward<T>(val);
97
17.5M
}
Unexecuted instantiation: unsigned long const& inline_assertion_check<false, unsigned long const&>(unsigned long const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
std::optional<unsigned int>&& inline_assertion_check<true, std::optional<unsigned int>>(std::optional<unsigned int>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
3
{
91
3
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
3
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
3
    }
96
3
    return std::forward<T>(val);
97
3
}
CBlockIndex*&& inline_assertion_check<true, CBlockIndex*>(CBlockIndex*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
117k
{
91
117k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
117k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
117k
    }
96
117k
    return std::forward<T>(val);
97
117k
}
std::optional<BCLog::LogFlags>&& inline_assertion_check<true, std::optional<BCLog::LogFlags>>(std::optional<BCLog::LogFlags>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
31
{
91
31
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
31
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
31
    }
96
31
    return std::forward<T>(val);
97
31
}
std::shared_ptr<BCLog::LogRateLimiter>& inline_assertion_check<true, std::shared_ptr<BCLog::LogRateLimiter>&>(std::shared_ptr<BCLog::LogRateLimiter>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
1
{
91
1
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
1
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
1
    }
96
1
    return std::forward<T>(val);
97
1
}
CBlockIndex*& inline_assertion_check<true, CBlockIndex*&>(CBlockIndex*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
306k
{
91
306k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
306k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
306k
    }
96
306k
    return std::forward<T>(val);
97
306k
}
CTxMemPoolEntry const*&& inline_assertion_check<true, CTxMemPoolEntry const*>(CTxMemPoolEntry const*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
260
{
91
260
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
260
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
260
    }
96
260
    return std::forward<T>(val);
97
260
}
ArgsManager*& inline_assertion_check<true, ArgsManager*&>(ArgsManager*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
46.4k
{
91
46.4k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
46.4k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
46.4k
    }
96
46.4k
    return std::forward<T>(val);
97
46.4k
}
std::optional<std::vector<std::byte, std::allocator<std::byte>>>&& inline_assertion_check<true, std::optional<std::vector<std::byte, std::allocator<std::byte>>>>(std::optional<std::vector<std::byte, std::allocator<std::byte>>>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
3.73k
{
91
3.73k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
3.73k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
3.73k
    }
96
3.73k
    return std::forward<T>(val);
97
3.73k
}
unsigned long const& inline_assertion_check<true, unsigned long const&>(unsigned long const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
24
{
91
24
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
24
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
24
    }
96
24
    return std::forward<T>(val);
97
24
}
util::Expected<std::future<void>, ThreadPool::SubmitError>&& inline_assertion_check<true, util::Expected<std::future<void>, ThreadPool::SubmitError>>(util::Expected<std::future<void>, ThreadPool::SubmitError>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
349
{
91
349
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
349
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
349
    }
96
349
    return std::forward<T>(val);
97
349
}
ThreadPool::SubmitError*&& inline_assertion_check<true, ThreadPool::SubmitError*>(ThreadPool::SubmitError*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
5
{
91
5
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
5
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
5
    }
96
5
    return std::forward<T>(val);
97
5
}
ThreadPool::SubmitError const*&& inline_assertion_check<true, ThreadPool::SubmitError const*>(ThreadPool::SubmitError const*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2
{
91
2
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
2
    }
96
2
    return std::forward<T>(val);
97
2
}
util::Expected<std::future<bool>, ThreadPool::SubmitError>&& inline_assertion_check<true, util::Expected<std::future<bool>, ThreadPool::SubmitError>>(util::Expected<std::future<bool>, ThreadPool::SubmitError>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2
{
91
2
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
2
    }
96
2
    return std::forward<T>(val);
97
2
}
util::Expected<std::future<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, ThreadPool::SubmitError>&& inline_assertion_check<true, util::Expected<std::future<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, ThreadPool::SubmitError>>(util::Expected<std::future<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, ThreadPool::SubmitError>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
1
{
91
1
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
1
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
1
    }
96
1
    return std::forward<T>(val);
97
1
}
util::Expected<std::vector<std::future<int>, std::allocator<std::future<int>>>, ThreadPool::SubmitError>&& inline_assertion_check<true, util::Expected<std::vector<std::future<int>, std::allocator<std::future<int>>>, ThreadPool::SubmitError>>(util::Expected<std::vector<std::future<int>, std::allocator<std::future<int>>>, ThreadPool::SubmitError>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2
{
91
2
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
2
    }
96
2
    return std::forward<T>(val);
97
2
}
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*&& inline_assertion_check<true, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2
{
91
2
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
2
    }
96
2
    return std::forward<T>(val);
97
2
}
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*&& inline_assertion_check<true, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
4
{
91
4
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
4
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
4
    }
96
4
    return std::forward<T>(val);
97
4
}
std::unique_ptr<int, std::default_delete<int>>*&& inline_assertion_check<true, std::unique_ptr<int, std::default_delete<int>>*>(std::unique_ptr<int, std::default_delete<int>>*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
3
{
91
3
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
3
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
3
    }
96
3
    return std::forward<T>(val);
97
3
}
std::unique_ptr<int, std::default_delete<int>>&& inline_assertion_check<true, std::unique_ptr<int, std::default_delete<int>>>(std::unique_ptr<int, std::default_delete<int>>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2
{
91
2
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
2
    }
96
2
    return std::forward<T>(val);
97
2
}
std::unique_ptr<int, std::default_delete<int>> const& inline_assertion_check<true, std::unique_ptr<int, std::default_delete<int>> const&>(std::unique_ptr<int, std::default_delete<int>> const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2
{
91
2
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
2
    }
96
2
    return std::forward<T>(val);
97
2
}
bool const& inline_assertion_check<true, bool const&>(bool const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2
{
91
2
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
2
    }
96
2
    return std::forward<T>(val);
97
2
}
util_tests.cpp:util_tests::(anonymous namespace)::NoCopyOrMove& inline_assertion_check<true, util_tests::(anonymous namespace)::NoCopyOrMove&>(util_tests::(anonymous namespace)::NoCopyOrMove&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
6
{
91
6
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
6
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
6
    }
96
6
    return std::forward<T>(val);
97
6
}
int&& inline_assertion_check<true, int>(int&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2
{
91
2
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
2
    }
96
2
    return std::forward<T>(val);
97
2
}
Unexecuted instantiation: std::optional<int>&& inline_assertion_check<true, std::optional<int>>(std::optional<int>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Chainstate*&& inline_assertion_check<true, Chainstate*>(Chainstate*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
7
{
91
7
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
7
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
7
    }
96
7
    return std::forward<T>(val);
97
7
}
std::optional<uint256> const&& inline_assertion_check<true, std::optional<uint256> const>(std::optional<uint256> const&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
4
{
91
4
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
4
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
4
    }
96
4
    return std::forward<T>(val);
97
4
}
std::unique_ptr<wallet::WalletDatabase, std::default_delete<wallet::WalletDatabase>> const& inline_assertion_check<true, std::unique_ptr<wallet::WalletDatabase, std::default_delete<wallet::WalletDatabase>> const&>(std::unique_ptr<wallet::WalletDatabase, std::default_delete<wallet::WalletDatabase>> const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2
{
91
2
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
2
    }
96
2
    return std::forward<T>(val);
97
2
}
std::unique_ptr<wallet::SQLiteDatabase, std::default_delete<wallet::SQLiteDatabase>> const& inline_assertion_check<true, std::unique_ptr<wallet::SQLiteDatabase, std::default_delete<wallet::SQLiteDatabase>> const&>(std::unique_ptr<wallet::SQLiteDatabase, std::default_delete<wallet::SQLiteDatabase>> const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2
{
91
2
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
2
    }
96
2
    return std::forward<T>(val);
97
2
}
util::Result<std::variant<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, PayToAnchor, WitnessUnknown>>&& inline_assertion_check<true, util::Result<std::variant<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, PayToAnchor, WitnessUnknown>>>(util::Result<std::variant<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, PayToAnchor, WitnessUnknown>>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
6.11k
{
91
6.11k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
6.11k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
6.11k
    }
96
6.11k
    return std::forward<T>(val);
97
6.11k
}
util::Result<wallet::CoinsResult>&& inline_assertion_check<true, util::Result<wallet::CoinsResult>>(util::Result<wallet::CoinsResult>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
1
{
91
1
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
1
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
1
    }
96
1
    return std::forward<T>(val);
97
1
}
std::optional<OutputType>&& inline_assertion_check<true, std::optional<OutputType>>(std::optional<OutputType>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
124
{
91
124
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
124
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
124
    }
96
124
    return std::forward<T>(val);
97
124
}
util::Result<std::reference_wrapper<wallet::DescriptorScriptPubKeyMan>>&& inline_assertion_check<true, util::Result<std::reference_wrapper<wallet::DescriptorScriptPubKeyMan>>>(util::Result<std::reference_wrapper<wallet::DescriptorScriptPubKeyMan>>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
27
{
91
27
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
27
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
27
    }
96
27
    return std::forward<T>(val);
97
27
}
Unexecuted instantiation: std::atomic<bool>& inline_assertion_check<true, std::atomic<bool>&>(std::atomic<bool>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
CTxMemPool*&& inline_assertion_check<true, CTxMemPool*>(CTxMemPool*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
1.17k
{
91
1.17k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
1.17k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
1.17k
    }
96
1.17k
    return std::forward<T>(val);
97
1.17k
}
util::Result<void> const& inline_assertion_check<true, util::Result<void> const&>(util::Result<void> const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
168
{
91
168
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
168
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
168
    }
96
168
    return std::forward<T>(val);
97
168
}
std::optional<PresaltedSipHasher>& inline_assertion_check<true, std::optional<PresaltedSipHasher>&>(std::optional<PresaltedSipHasher>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
124k
{
91
124k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
124k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
124k
    }
96
124k
    return std::forward<T>(val);
97
124k
}
CBlockIndex const*&& inline_assertion_check<true, CBlockIndex const*>(CBlockIndex const*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
9.62k
{
91
9.62k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
9.62k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
9.62k
    }
96
9.62k
    return std::forward<T>(val);
97
9.62k
}
evhttp_connection*&& inline_assertion_check<true, evhttp_connection*>(evhttp_connection*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
345k
{
91
345k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
345k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
345k
    }
96
345k
    return std::forward<T>(val);
97
345k
}
evhttp_request*& inline_assertion_check<true, evhttp_request*&>(evhttp_request*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
345k
{
91
345k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
345k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
345k
    }
96
345k
    return std::forward<T>(val);
97
345k
}
evhttp_connection const*& inline_assertion_check<true, evhttp_connection const*&>(evhttp_connection const*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
3.18k
{
91
3.18k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
3.18k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
3.18k
    }
96
3.18k
    return std::forward<T>(val);
97
3.18k
}
CBlockIndex const*& inline_assertion_check<true, CBlockIndex const*&>(CBlockIndex const*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
132k
{
91
132k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
132k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
132k
    }
96
132k
    return std::forward<T>(val);
97
132k
}
CBlock const* const& inline_assertion_check<true, CBlock const* const&>(CBlock const* const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
7.54k
{
91
7.54k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
7.54k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
7.54k
    }
96
7.54k
    return std::forward<T>(val);
97
7.54k
}
CBlockUndo const* const& inline_assertion_check<true, CBlockUndo const* const&>(CBlockUndo const* const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
7.90k
{
91
7.90k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
7.90k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
7.90k
    }
96
7.90k
    return std::forward<T>(val);
97
7.90k
}
uint256 const* const& inline_assertion_check<true, uint256 const* const&>(uint256 const* const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
188k
{
91
188k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
188k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
188k
    }
96
188k
    return std::forward<T>(val);
97
188k
}
std::optional<util::SignalInterrupt>& inline_assertion_check<true, std::optional<util::SignalInterrupt>&>(std::optional<util::SignalInterrupt>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
22
{
91
22
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
22
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
22
    }
96
22
    return std::forward<T>(val);
97
22
}
util::Result<void>&& inline_assertion_check<true, util::Result<void>>(util::Result<void>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
3.09k
{
91
3.09k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
3.09k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
3.09k
    }
96
3.09k
    return std::forward<T>(val);
97
3.09k
}
std::unique_ptr<ValidationSignals, std::default_delete<ValidationSignals>>& inline_assertion_check<true, std::unique_ptr<ValidationSignals, std::default_delete<ValidationSignals>>&>(std::unique_ptr<ValidationSignals, std::default_delete<ValidationSignals>>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
1.93k
{
91
1.93k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
1.93k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
1.93k
    }
96
1.93k
    return std::forward<T>(val);
97
1.93k
}
std::unique_ptr<node::KernelNotifications, std::default_delete<node::KernelNotifications>>& inline_assertion_check<true, std::unique_ptr<node::KernelNotifications, std::default_delete<node::KernelNotifications>>&>(std::unique_ptr<node::KernelNotifications, std::default_delete<node::KernelNotifications>>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
37.6k
{
91
37.6k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
37.6k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
37.6k
    }
96
37.6k
    return std::forward<T>(val);
97
37.6k
}
bool& inline_assertion_check<false, bool&>(bool&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
422k
{
91
422k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
422k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
422k
    }
96
422k
    return std::forward<T>(val);
97
422k
}
net_processing.cpp:(anonymous namespace)::CNodeState*&& inline_assertion_check<true, (anonymous namespace)::CNodeState*>((anonymous namespace)::CNodeState*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
56.1k
{
91
56.1k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
56.1k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
56.1k
    }
96
56.1k
    return std::forward<T>(val);
97
56.1k
}
net_processing.cpp:std::shared_ptr<(anonymous namespace)::Peer>&& inline_assertion_check<true, std::shared_ptr<(anonymous namespace)::Peer>>(std::shared_ptr<(anonymous namespace)::Peer>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
4
{
91
4
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
4
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
4
    }
96
4
    return std::forward<T>(val);
97
4
}
CBlockIndex*&& inline_assertion_check<false, CBlockIndex*>(CBlockIndex*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
17.3k
{
91
17.3k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
17.3k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
17.3k
    }
96
17.3k
    return std::forward<T>(val);
97
17.3k
}
std::optional<AssumeutxoData> const& inline_assertion_check<true, std::optional<AssumeutxoData> const&>(std::optional<AssumeutxoData> const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
6
{
91
6
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
6
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
6
    }
96
6
    return std::forward<T>(val);
97
6
}
std::optional<node::BlockfileCursor>& inline_assertion_check<true, std::optional<node::BlockfileCursor>&>(std::optional<node::BlockfileCursor>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
106k
{
91
106k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
106k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
106k
    }
96
106k
    return std::forward<T>(val);
97
106k
}
Unexecuted instantiation: node::NodeContext*& inline_assertion_check<true, node::NodeContext*&>(node::NodeContext*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Unexecuted instantiation: node::NodeContext*&& inline_assertion_check<true, node::NodeContext*>(node::NodeContext*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Unexecuted instantiation: interfaces::WalletLoader*& inline_assertion_check<true, interfaces::WalletLoader*&>(interfaces::WalletLoader*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
std::optional<unsigned long> const& inline_assertion_check<true, std::optional<unsigned long> const&>(std::optional<unsigned long> const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
44.4k
{
91
44.4k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
44.4k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
44.4k
    }
96
44.4k
    return std::forward<T>(val);
97
44.4k
}
std::optional<uint256> const& inline_assertion_check<false, std::optional<uint256> const&>(std::optional<uint256> const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
69
{
91
69
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
69
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
69
    }
96
69
    return std::forward<T>(val);
97
69
}
std::optional<uint256>&& inline_assertion_check<false, std::optional<uint256>>(std::optional<uint256>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
36.6k
{
91
36.6k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
36.6k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
36.6k
    }
96
36.6k
    return std::forward<T>(val);
97
36.6k
}
bool const& inline_assertion_check<false, bool const&>(bool const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
512k
{
91
512k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
512k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
512k
    }
96
512k
    return std::forward<T>(val);
97
512k
}
node::ReadRawError const*&& inline_assertion_check<true, node::ReadRawError const*>(node::ReadRawError const*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
12
{
91
12
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
12
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
12
    }
96
12
    return std::forward<T>(val);
97
12
}
unsigned int&& inline_assertion_check<false, unsigned int>(unsigned int&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
15.6M
{
91
15.6M
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
15.6M
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
15.6M
    }
96
15.6M
    return std::forward<T>(val);
97
15.6M
}
TxGraph::Ref const*& inline_assertion_check<false, TxGraph::Ref const*&>(TxGraph::Ref const*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2.72k
{
91
2.72k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2.72k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
2.72k
    }
96
2.72k
    return std::forward<T>(val);
97
2.72k
}
txgraph.cpp:(anonymous namespace)::Cluster*& inline_assertion_check<false, (anonymous namespace)::Cluster*&>((anonymous namespace)::Cluster*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
168k
{
91
168k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
168k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
168k
    }
96
168k
    return std::forward<T>(val);
97
168k
}
Unexecuted instantiation: std::unique_ptr<CTxMemPool::ChangeSet, std::default_delete<CTxMemPool::ChangeSet>>& inline_assertion_check<false, std::unique_ptr<CTxMemPool::ChangeSet, std::default_delete<CTxMemPool::ChangeSet>>&>(std::unique_ptr<CTxMemPool::ChangeSet, std::default_delete<CTxMemPool::ChangeSet>>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
std::shared_ptr<CBlock const>& inline_assertion_check<true, std::shared_ptr<CBlock const>&>(std::shared_ptr<CBlock const>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
106k
{
91
106k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
106k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
106k
    }
96
106k
    return std::forward<T>(val);
97
106k
}
uint256 const*& inline_assertion_check<true, uint256 const*&>(uint256 const*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
45.1k
{
91
45.1k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
45.1k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
45.1k
    }
96
45.1k
    return std::forward<T>(val);
97
45.1k
}
std::optional<int> const& inline_assertion_check<true, std::optional<int> const&>(std::optional<int> const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
415k
{
91
415k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
415k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
415k
    }
96
415k
    return std::forward<T>(val);
97
415k
}
CBlockIndex* const& inline_assertion_check<false, CBlockIndex* const&>(CBlockIndex* const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
305k
{
91
305k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
305k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
305k
    }
96
305k
    return std::forward<T>(val);
97
305k
}
std::unique_ptr<Chainstate, std::default_delete<Chainstate>>&& inline_assertion_check<true, std::unique_ptr<Chainstate, std::default_delete<Chainstate>>>(std::unique_ptr<Chainstate, std::default_delete<Chainstate>>&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2
{
91
2
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
2
    }
96
2
    return std::forward<T>(val);
97
2
}
std::unique_ptr<util::TaskRunnerInterface, std::default_delete<util::TaskRunnerInterface>>& inline_assertion_check<true, std::unique_ptr<util::TaskRunnerInterface, std::default_delete<util::TaskRunnerInterface>>&>(std::unique_ptr<util::TaskRunnerInterface, std::default_delete<util::TaskRunnerInterface>>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
1.26k
{
91
1.26k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
1.26k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
1.26k
    }
96
1.26k
    return std::forward<T>(val);
97
1.26k
}
std::optional<long> const& inline_assertion_check<true, std::optional<long> const&>(std::optional<long> const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
3.76k
{
91
3.76k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
3.76k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
3.76k
    }
96
3.76k
    return std::forward<T>(val);
97
3.76k
}
CScheduler*& inline_assertion_check<true, CScheduler*&>(CScheduler*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
7
{
91
7
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
7
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
7
    }
96
7
    return std::forward<T>(val);
97
7
}
wallet::CWalletTx const*&& inline_assertion_check<true, wallet::CWalletTx const*>(wallet::CWalletTx const*&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
5
{
91
5
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
5
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
5
    }
96
5
    return std::forward<T>(val);
97
5
}
std::unique_ptr<wallet::SQliteExecHandler, std::default_delete<wallet::SQliteExecHandler>>& inline_assertion_check<true, std::unique_ptr<wallet::SQliteExecHandler, std::default_delete<wallet::SQliteExecHandler>>&>(std::unique_ptr<wallet::SQliteExecHandler, std::default_delete<wallet::SQliteExecHandler>>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
150k
{
91
150k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
150k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
150k
    }
96
150k
    return std::forward<T>(val);
97
150k
}
unsigned long&& inline_assertion_check<true, unsigned long>(unsigned long&&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
616
{
91
616
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
616
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
616
    }
96
616
    return std::forward<T>(val);
97
616
}
ArgsManager* const& inline_assertion_check<true, ArgsManager* const&>(ArgsManager* const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
950
{
91
950
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
950
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
950
    }
96
950
    return std::forward<T>(val);
97
950
}
wallet::LegacyDataSPKM*& inline_assertion_check<false, wallet::LegacyDataSPKM*&>(wallet::LegacyDataSPKM*&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
70
{
91
70
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
70
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
70
    }
96
70
    return std::forward<T>(val);
97
70
}
std::shared_ptr<CTransaction const>& inline_assertion_check<true, std::shared_ptr<CTransaction const>&>(std::shared_ptr<CTransaction const>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
2
{
91
2
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
2
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
2
    }
96
2
    return std::forward<T>(val);
97
2
}
bool& inline_assertion_check<true, bool&>(bool&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
238
{
91
238
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
238
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
238
    }
96
238
    return std::forward<T>(val);
97
238
}
std::optional<fs::path> const& inline_assertion_check<true, std::optional<fs::path> const&>(std::optional<fs::path> const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
3.40k
{
91
3.40k
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
3.40k
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
3.40k
    }
96
3.40k
    return std::forward<T>(val);
97
3.40k
}
std::optional<std::pair<XOnlyPubKey, bool>>& inline_assertion_check<false, std::optional<std::pair<XOnlyPubKey, bool>>&>(std::optional<std::pair<XOnlyPubKey, bool>>&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
526
{
91
526
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
526
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
526
    }
96
526
    return std::forward<T>(val);
97
526
}
std::map<uint256, MuSig2SecNonce, std::less<uint256>, std::allocator<std::pair<uint256 const, MuSig2SecNonce>>>* const& inline_assertion_check<false, std::map<uint256, MuSig2SecNonce, std::less<uint256>, std::allocator<std::pair<uint256 const, MuSig2SecNonce>>>* const&>(std::map<uint256, MuSig2SecNonce, std::less<uint256>, std::allocator<std::pair<uint256 const, MuSig2SecNonce>>>* const&, std::source_location const&, std::basic_string_view<char, std::char_traits<char>>)
Line
Count
Source
90
276
{
91
276
    if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
92
276
        if (!val) {
93
0
            assertion_fail(loc, assertion);
94
0
        }
95
276
    }
96
276
    return std::forward<T>(val);
97
276
}
98
99
0
#define STR_INTERNAL_BUG(msg) StrFormatInternalBug((msg), std::source_location::current())
100
101
/**
102
 * Identity function. Throw a NonFatalCheckError when the condition evaluates to false
103
 *
104
 * This should only be used
105
 * - where the condition is assumed to be true, not for error handling or validating user input
106
 * - where a failure to fulfill the condition is recoverable and does not abort the program
107
 *
108
 * For example in RPC code, where it is undesirable to crash the whole program, this can be generally used to replace
109
 * asserts or recoverable logic errors. A NonFatalCheckError in RPC code is caught and passed as a string to the RPC
110
 * caller, which can then report the issue to the developers.
111
 */
112
#define CHECK_NONFATAL(condition) \
113
247M
    inline_check_non_fatal(condition, std::source_location::current(), #condition)
blockchain.cpp:GetUTXOStats(CCoinsView*, node::BlockManager&, kernel::CoinStatsHashType, std::function<void ()> const&, CBlockIndex const*, bool)::$_0::operator()() const
Line
Count
Source
113
18
    inline_check_non_fatal(condition, std::source_location::current(), #condition)
blockchain.cpp:gettxoutsetinfo()::$_0::operator()(RPCMethod const&, JSONRPCRequest const&) const::'lambda'()::operator()() const
Line
Count
Source
113
32
    inline_check_non_fatal(condition, std::source_location::current(), #condition)
blockchain.cpp:scanblocks()::$_0::operator()(RPCMethod const&, JSONRPCRequest const&) const::'lambda0'()::operator()() const
Line
Count
Source
113
3
    inline_check_non_fatal(condition, std::source_location::current(), #condition)
114
115
/** Identity function. Abort if the value compares equal to zero */
116
30.6M
#define Assert(val) inline_assertion_check<true>(val, std::source_location::current(), #val)
validation_chainstate_tests.cpp:validation_chainstate_tests::chainstate_update_tip::test_method()::$_2::operator()() const
Line
Count
Source
116
1
#define Assert(val) inline_assertion_check<true>(val, std::source_location::current(), #val)
validation_chainstate_tests.cpp:bool CreateAndActivateUTXOSnapshot<$_4>(TestingSetup*, $_4, bool, bool)::'lambda0'()::operator()() const
Line
Count
Source
116
1
#define Assert(val) inline_assertion_check<true>(val, std::source_location::current(), #val)
Unexecuted instantiation: validation_chainstatemanager_tests.cpp:bool CreateAndActivateUTXOSnapshot<$_37 const>(TestingSetup*, $_37 const, bool, bool)::'lambda0'()::operator()() const
Unexecuted instantiation: validation_chainstatemanager_tests.cpp:bool CreateAndActivateUTXOSnapshot<validation_chainstatemanager_tests::SnapshotTestSetup::SetupSnapshot()::'lambda'(AutoFile&, node::SnapshotMetadata&)>(TestingSetup*, validation_chainstatemanager_tests::SnapshotTestSetup::SetupSnapshot()::'lambda'(AutoFile&, node::SnapshotMetadata&), bool, bool)::'lambda0'()::operator()() const
Unexecuted instantiation: validation_chainstatemanager_tests.cpp:bool CreateAndActivateUTXOSnapshot<validation_chainstatemanager_tests::SnapshotTestSetup::SetupSnapshot()::'lambda0'(AutoFile&, node::SnapshotMetadata&)>(TestingSetup*, validation_chainstatemanager_tests::SnapshotTestSetup::SetupSnapshot()::'lambda0'(AutoFile&, node::SnapshotMetadata&), bool, bool)::'lambda0'()::operator()() const
Unexecuted instantiation: validation_chainstatemanager_tests.cpp:bool CreateAndActivateUTXOSnapshot<validation_chainstatemanager_tests::SnapshotTestSetup::SetupSnapshot()::'lambda1'(AutoFile&, node::SnapshotMetadata&)>(TestingSetup*, validation_chainstatemanager_tests::SnapshotTestSetup::SetupSnapshot()::'lambda1'(AutoFile&, node::SnapshotMetadata&), bool, bool)::'lambda0'()::operator()() const
Unexecuted instantiation: validation_chainstatemanager_tests.cpp:bool CreateAndActivateUTXOSnapshot<validation_chainstatemanager_tests::SnapshotTestSetup::SetupSnapshot()::'lambda2'(AutoFile&, node::SnapshotMetadata&)>(TestingSetup*, validation_chainstatemanager_tests::SnapshotTestSetup::SetupSnapshot()::'lambda2'(AutoFile&, node::SnapshotMetadata&), bool, bool)::'lambda0'()::operator()() const
Unexecuted instantiation: validation_chainstatemanager_tests.cpp:bool CreateAndActivateUTXOSnapshot<validation_chainstatemanager_tests::SnapshotTestSetup::SetupSnapshot()::'lambda3'(AutoFile&, node::SnapshotMetadata&)>(TestingSetup*, validation_chainstatemanager_tests::SnapshotTestSetup::SetupSnapshot()::'lambda3'(AutoFile&, node::SnapshotMetadata&), bool, bool)::'lambda0'()::operator()() const
validation_chainstatemanager_tests::SnapshotTestSetup::SetupSnapshot()::'lambda0'()::operator()() const
Line
Count
Source
116
4
#define Assert(val) inline_assertion_check<true>(val, std::source_location::current(), #val)
validation_chainstatemanager_tests.cpp:validation_chainstatemanager_tests::chainstatemanager_snapshot_completion::test_method()::$_0::operator()() const
Line
Count
Source
116
1
#define Assert(val) inline_assertion_check<true>(val, std::source_location::current(), #val)
Unexecuted instantiation: txmempool.cpp:CheckMempoolEphemeralInvariants(CTxMemPool const&)::$_0::operator()(CTxIn const&) const
blockstorage.cpp:node::BlockManager::WriteBlockUndo(CBlockUndo const&, BlockValidationState&, CBlockIndex&)::$_0::operator()() const
Line
Count
Source
116
106k
#define Assert(val) inline_assertion_check<true>(val, std::source_location::current(), #val)
117
118
/**
119
 * Assume is the identity function.
120
 *
121
 * - Should be used to run non-fatal checks. In debug builds it behaves like
122
 *   Assert()/assert() to notify developers and testers about non-fatal errors.
123
 *   In production it doesn't warn or log anything.
124
 * - For fatal errors, use Assert().
125
 * - For non-fatal errors in interactive sessions (e.g. RPC or command line
126
 *   interfaces), CHECK_NONFATAL() might be more appropriate.
127
 */
128
2.25G
#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
net_processing.cpp:(anonymous namespace)::PeerManagerImpl::ProcessMessage((anonymous namespace)::Peer&, CNode&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, DataStream&, std::chrono::time_point<NodeClock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>, std::atomic<bool> const&)::$_2::operator()() const
Line
Count
Source
128
4.43k
#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
mini_miner.cpp:_ZZNK4node9MiniMiner11SanityCheckEvENK3$_0clISt17_Rb_tree_iteratorISt4pairIK22transaction_identifierILb0EENS_21MiniMinerMempoolEntryEEEEEDaRKT_
Line
Count
Source
128
3.46M
#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
mini_miner.cpp:_ZZNK4node9MiniMiner11SanityCheckEvENK3$_1clI22transaction_identifierILb0EEEEDaRKT_
Line
Count
Source
128
406
#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
ephemeral_policy.cpp:_ZZ20CheckEphemeralSpendsRKSt6vectorISt10shared_ptrIK12CTransactionESaIS3_EE8CFeeRateRK10CTxMemPoolR17TxValidationStateR22transaction_identifierILb1EEENK3$_0clIS3_EEDaRKT_
Line
Count
Source
128
29.8k
#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
validation.cpp:_ZZN17ChainstateManager25ReceivedBlockTransactionsERK6CBlockP11CBlockIndexRK11FlatFilePosENK3$_0clISt10unique_ptrI10ChainstateSt14default_deleteISB_EEEEDaRKT_
Line
Count
Source
128
2
#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
scriptpubkeyman.cpp:wallet::DescriptorScriptPubKeyMan::GetKey(CKeyID const&) const::$_0::operator()(std::vector<unsigned char, secure_allocator<unsigned char>> const&) const
Line
Count
Source
128
9
#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
wallet.cpp:wallet::CWallet::GetScriptPubKeyMans(CScript const&) const::$_0::operator()(wallet::ScriptPubKeyMan*) const
Line
Count
Source
128
114k
#define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
129
130
/**
131
 * NONFATAL_UNREACHABLE() is a macro that is used to mark unreachable code. It throws a NonFatalCheckError.
132
 */
133
#define NONFATAL_UNREACHABLE() \
134
0
    throw NonFatalCheckError { "Unreachable code reached (non-fatal)", std::source_location::current() }
135
136
#if defined(__has_feature)
137
#    if __has_feature(address_sanitizer)
138
#       include <sanitizer/asan_interface.h>
139
#    endif
140
#endif
141
142
#ifndef ASAN_POISON_MEMORY_REGION
143
75.8M
#   define ASAN_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
144
126M
#   define ASAN_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
145
#endif
146
147
#endif // BITCOIN_UTIL_CHECK_H