Coverage Report

Created: 2026-07-01 15:07

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/root/bitcoin/src/univalue/include/univalue.h
Line
Count
Source
1
// Copyright 2014 BitPay Inc.
2
// Copyright 2015 Bitcoin Core Developers
3
// Distributed under the MIT software license, see the accompanying
4
// file COPYING or https://opensource.org/licenses/mit-license.php.
5
6
#ifndef BITCOIN_UNIVALUE_INCLUDE_UNIVALUE_H
7
#define BITCOIN_UNIVALUE_INCLUDE_UNIVALUE_H
8
9
#include <charconv>
10
#include <cstddef>
11
#include <cstdint>
12
#include <map>
13
#include <stdexcept>
14
#include <string>
15
#include <string_view>
16
#include <system_error>
17
#include <type_traits>
18
#include <utility>
19
#include <vector>
20
21
// NOLINTNEXTLINE(misc-no-recursion)
22
class UniValue {
23
public:
24
    enum VType { VNULL, VOBJ, VARR, VSTR, VNUM, VBOOL, };
25
26
    class type_error : public std::runtime_error
27
    {
28
        using std::runtime_error::runtime_error;
29
    };
30
31
8.66k
    UniValue() { typ = VNULL; }
32
10.8k
    UniValue(UniValue::VType type, std::string str = {}) : typ{type}, val{std::move(str)} {}
33
    template <typename Ref, typename T = std::remove_cv_t<std::remove_reference_t<Ref>>,
34
              std::enable_if_t<std::is_floating_point_v<T> ||                      // setFloat
35
                                   std::is_same_v<bool, T> ||                      // setBool
36
                                   std::is_signed_v<T> || std::is_unsigned_v<T> || // setInt
37
                                   std::is_constructible_v<std::string, T>,        // setStr
38
                               bool> = true>
39
    UniValue(Ref&& val)
40
6.50k
    {
41
6.50k
        if constexpr (std::is_floating_point_v<T>) {
42
0
            setFloat(val);
43
2.16k
        } else if constexpr (std::is_same_v<bool, T>) {
44
2.16k
            setBool(val);
45
2.16k
        } else if constexpr (std::is_signed_v<T>) {
46
2.16k
            setInt(int64_t{val});
47
2.16k
        } else if constexpr (std::is_unsigned_v<T>) {
48
0
            setInt(uint64_t{val});
49
2.16k
        } else {
50
2.16k
            setStr(std::string{std::forward<Ref>(val)});
51
2.16k
        }
52
6.50k
    }
_ZN8UniValueC2IbbTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS2_Esr3stdE11is_signed_vIS2_Esr3stdE13is_unsigned_vIS2_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_EEbE4typeELb1EEEOT_
Line
Count
Source
40
2.16k
    {
41
        if constexpr (std::is_floating_point_v<T>) {
42
            setFloat(val);
43
2.16k
        } else if constexpr (std::is_same_v<bool, T>) {
44
2.16k
            setBool(val);
45
        } else if constexpr (std::is_signed_v<T>) {
46
            setInt(int64_t{val});
47
        } else if constexpr (std::is_unsigned_v<T>) {
48
            setInt(uint64_t{val});
49
        } else {
50
            setStr(std::string{std::forward<Ref>(val)});
51
        }
52
2.16k
    }
_ZN8UniValueC2IiiTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS2_Esr3stdE11is_signed_vIS2_Esr3stdE13is_unsigned_vIS2_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_EEbE4typeELb1EEEOT_
Line
Count
Source
40
2.16k
    {
41
        if constexpr (std::is_floating_point_v<T>) {
42
            setFloat(val);
43
        } else if constexpr (std::is_same_v<bool, T>) {
44
            setBool(val);
45
2.16k
        } else if constexpr (std::is_signed_v<T>) {
46
2.16k
            setInt(int64_t{val});
47
        } else if constexpr (std::is_unsigned_v<T>) {
48
            setInt(uint64_t{val});
49
        } else {
50
            setStr(std::string{std::forward<Ref>(val)});
51
        }
52
2.16k
    }
_ZN8UniValueC2IRA9_KcA9_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Line
Count
Source
40
2.16k
    {
41
        if constexpr (std::is_floating_point_v<T>) {
42
            setFloat(val);
43
        } else if constexpr (std::is_same_v<bool, T>) {
44
            setBool(val);
45
        } else if constexpr (std::is_signed_v<T>) {
46
            setInt(int64_t{val});
47
        } else if constexpr (std::is_unsigned_v<T>) {
48
            setInt(uint64_t{val});
49
2.16k
        } else {
50
2.16k
            setStr(std::string{std::forward<Ref>(val)});
51
2.16k
        }
52
2.16k
    }
Unexecuted instantiation: _ZN8UniValueC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_TnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS8_Esr3stdE11is_signed_vIS8_Esr3stdE13is_unsigned_vIS8_Esr3stdE18is_constructible_vIS6_S8_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRSt17basic_string_viewIcSt11char_traitsIcEES4_TnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS7_Esr3stdE11is_signed_vIS7_Esr3stdE13is_unsigned_vIS7_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcS3_SaIcEEES7_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_TnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS9_Esr3stdE11is_signed_vIS9_Esr3stdE13is_unsigned_vIS9_Esr3stdE18is_constructible_vIS6_S9_EEbE4typeELb1EEEOT_
_ZN8UniValueC2IRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_TnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbSA_Esr3stdE11is_signed_vISA_Esr3stdE13is_unsigned_vISA_Esr3stdE18is_constructible_vIS6_SA_EEbE4typeELb1EEEOT_
Line
Count
Source
40
1
    {
41
        if constexpr (std::is_floating_point_v<T>) {
42
            setFloat(val);
43
        } else if constexpr (std::is_same_v<bool, T>) {
44
            setBool(val);
45
        } else if constexpr (std::is_signed_v<T>) {
46
            setInt(int64_t{val});
47
        } else if constexpr (std::is_unsigned_v<T>) {
48
            setInt(uint64_t{val});
49
1
        } else {
50
1
            setStr(std::string{std::forward<Ref>(val)});
51
1
        }
52
1
    }
Unexecuted instantiation: _ZN8UniValueC2IRKjjTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IjjTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS2_Esr3stdE11is_signed_vIS2_Esr3stdE13is_unsigned_vIS2_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRjjTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS3_Esr3stdE11is_signed_vIS3_Esr3stdE13is_unsigned_vIS3_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES3_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA4_KcA4_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRiiTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS3_Esr3stdE11is_signed_vIS3_Esr3stdE13is_unsigned_vIS3_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES3_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA33_KcA33_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA47_KcA47_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA1_KcA1_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA5_KcA5_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA12_KcA12_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_TnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS9_Esr3stdE11is_signed_vIS9_Esr3stdE13is_unsigned_vIS9_Esr3stdE18is_constructible_vIS6_S9_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRKiiTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2ImmTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS2_Esr3stdE11is_signed_vIS2_Esr3stdE13is_unsigned_vIS2_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRmmTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS3_Esr3stdE11is_signed_vIS3_Esr3stdE13is_unsigned_vIS3_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES3_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRKllTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IllTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS2_Esr3stdE11is_signed_vIS2_Esr3stdE13is_unsigned_vIS2_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IddTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS2_Esr3stdE11is_signed_vIS2_Esr3stdE13is_unsigned_vIS2_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRllTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS3_Esr3stdE11is_signed_vIS3_Esr3stdE13is_unsigned_vIS3_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES3_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA103_KcA103_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRbbTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS3_Esr3stdE11is_signed_vIS3_Esr3stdE13is_unsigned_vIS3_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES3_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRKbbTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRhhTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS3_Esr3stdE11is_signed_vIS3_Esr3stdE13is_unsigned_vIS3_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES3_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA11_KcA11_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA30_KcA30_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA45_KcA45_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA86_KcA86_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA54_KcA54_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRKmmTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA137_KcA137_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA6_KcA6_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA3_KcA3_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA35_KcA35_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA7_KcA7_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA8_KcA8_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA18_KcA18_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA26_KcA26_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA38_KcA38_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRddTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS3_Esr3stdE11is_signed_vIS3_Esr3stdE13is_unsigned_vIS3_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES3_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA60_KcA60_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA17_KcA17_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA15_KcA15_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA87_KcA87_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA22_KcA22_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA10_KcA10_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA23_KcA23_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA13_KcA13_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IPKcS2_TnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRKttTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA21_KcA21_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IttTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS2_Esr3stdE11is_signed_vIS2_Esr3stdE13is_unsigned_vIS2_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRA91_KcA91_cTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS6_Esr3stdE11is_signed_vIS6_Esr3stdE13is_unsigned_vIS6_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEbE4typeELb1EEEOT_
Unexecuted instantiation: _ZN8UniValueC2IRKhhTnNSt9enable_ifIXoooooooosr3stdE19is_floating_point_vIT0_Esr3stdE9is_same_vIbS4_Esr3stdE11is_signed_vIS4_Esr3stdE13is_unsigned_vIS4_Esr3stdE18is_constructible_vINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_EEbE4typeELb1EEEOT_
53
54
    void clear();
55
56
    void setNull();
57
    void setBool(bool val);
58
    void setNumStr(std::string str);
59
    void setInt(uint64_t val);
60
    void setInt(int64_t val);
61
0
    void setInt(int val_) { return setInt(int64_t{val_}); }
62
    void setFloat(double val);
63
    void setStr(std::string str);
64
    void setArray();
65
    void setObject();
66
67
26.0k
    enum VType getType() const { return typ; }
68
0
    const std::string& getValStr() const { return val; }
69
0
    bool empty() const { return (values.size() == 0); }
70
71
0
    size_t size() const { return values.size(); }
72
73
    void reserve(size_t new_cap);
74
75
    void getObjMap(std::map<std::string,UniValue>& kv) const;
76
    bool checkObject(const std::map<std::string,UniValue::VType>& memberTypes) const;
77
    const UniValue& operator[](const std::string& key) const;
78
    const UniValue& operator[](size_t index) const;
79
0
    bool exists(const std::string& key) const { size_t i; return findKey(key, i); }
80
81
0
    bool isNull() const { return (typ == VNULL); }
82
0
    bool isTrue() const { return (typ == VBOOL) && (val == "1"); }
  Branch (82:34): [True: 0, False: 0]
  Branch (82:52): [True: 0, False: 0]
83
0
    bool isFalse() const { return (typ == VBOOL) && (val != "1"); }
  Branch (83:35): [True: 0, False: 0]
  Branch (83:53): [True: 0, False: 0]
84
0
    bool isBool() const { return (typ == VBOOL); }
85
0
    bool isStr() const { return (typ == VSTR); }
86
0
    bool isNum() const { return (typ == VNUM); }
87
0
    bool isArray() const { return (typ == VARR); }
88
0
    bool isObject() const { return (typ == VOBJ); }
89
90
    void push_back(UniValue val);
91
    void push_backV(const std::vector<UniValue>& vec);
92
    template <class It>
93
    void push_backV(It first, It last);
94
95
    void pushKVEnd(std::string key, UniValue val);
96
    void pushKV(std::string key, UniValue val);
97
    void pushKVs(UniValue obj);
98
99
    std::string write(unsigned int prettyIndent = 0,
100
                      unsigned int indentLevel = 0) const;
101
102
    bool read(std::string_view raw);
103
104
private:
105
    UniValue::VType typ;
106
    std::string val;                       // numbers are stored as C++ strings
107
    std::vector<std::string> keys;
108
    std::vector<UniValue> values;
109
110
    void checkType(const VType& expected) const;
111
    bool findKey(const std::string& key, size_t& retIdx) const;
112
    void writeArray(unsigned int prettyIndent, unsigned int indentLevel, std::string& s) const;
113
    void writeObject(unsigned int prettyIndent, unsigned int indentLevel, std::string& s) const;
114
115
public:
116
    // Strict type-specific getters, these throw std::runtime_error if the
117
    // value is of unexpected type
118
    const std::vector<std::string>& getKeys() const;
119
    const std::vector<UniValue>& getValues() const;
120
    template <typename Int>
121
    Int getInt() const;
122
    bool get_bool() const;
123
    const std::string& get_str() const;
124
    double get_real() const;
125
    const UniValue& get_obj() const;
126
    const UniValue& get_array() const;
127
128
0
    enum VType type() const { return getType(); }
129
    const UniValue& find_value(std::string_view key) const;
130
};
131
132
template <class It>
133
void UniValue::push_backV(It first, It last)
134
0
{
135
0
    checkType(VARR);
136
0
    values.insert(values.end(), first, last);
137
0
}
Unexecuted instantiation: _ZN8UniValue10push_backVISt13move_iteratorISt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPS_St6vectorIS_SaIS_EEEEEEEEvT_SC_
Unexecuted instantiation: _ZN8UniValue10push_backVIN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS8_SaIS8_EEEEEEvT_SF_
138
139
template <typename Int>
140
Int UniValue::getInt() const
141
0
{
142
0
    static_assert(std::is_integral_v<Int>);
143
0
    checkType(VNUM);
144
0
    Int result;
145
0
    const auto [first_nonmatching, error_condition] = std::from_chars(val.data(), val.data() + val.size(), result);
146
0
    if (first_nonmatching != val.data() + val.size() || error_condition != std::errc{}) {
  Branch (146:9): [True: 0, False: 0]
  Branch (146:57): [True: 0, False: 0]
  Branch (146:9): [True: 0, False: 0]
  Branch (146:57): [True: 0, False: 0]
  Branch (146:9): [True: 0, False: 0]
  Branch (146:57): [True: 0, False: 0]
  Branch (146:9): [True: 0, False: 0]
  Branch (146:57): [True: 0, False: 0]
  Branch (146:9): [True: 0, False: 0]
  Branch (146:57): [True: 0, False: 0]
  Branch (146:9): [True: 0, False: 0]
  Branch (146:57): [True: 0, False: 0]
  Branch (146:9): [True: 0, False: 0]
  Branch (146:57): [True: 0, False: 0]
  Branch (146:9): [True: 0, False: 0]
  Branch (146:57): [True: 0, False: 0]
147
0
        throw std::runtime_error("JSON integer out of range");
148
0
    }
149
0
    return result;
150
0
}
Unexecuted instantiation: _ZNK8UniValue6getIntIlEET_v
Unexecuted instantiation: _ZNK8UniValue6getIntIaEET_v
Unexecuted instantiation: _ZNK8UniValue6getIntIhEET_v
Unexecuted instantiation: _ZNK8UniValue6getIntIsEET_v
Unexecuted instantiation: _ZNK8UniValue6getIntItEET_v
Unexecuted instantiation: _ZNK8UniValue6getIntIiEET_v
Unexecuted instantiation: _ZNK8UniValue6getIntIjEET_v
Unexecuted instantiation: _ZNK8UniValue6getIntImEET_v
151
152
enum jtokentype {
153
    JTOK_ERR        = -1,
154
    JTOK_NONE       = 0,                           // eof
155
    JTOK_OBJ_OPEN,
156
    JTOK_OBJ_CLOSE,
157
    JTOK_ARR_OPEN,
158
    JTOK_ARR_CLOSE,
159
    JTOK_COLON,
160
    JTOK_COMMA,
161
    JTOK_KW_NULL,
162
    JTOK_KW_TRUE,
163
    JTOK_KW_FALSE,
164
    JTOK_NUMBER,
165
    JTOK_STRING,
166
};
167
168
extern enum jtokentype getJsonToken(std::string& tokenVal,
169
                                    unsigned int& consumed, const char *raw, const char *end);
170
extern const char *uvTypeName(UniValue::VType t);
171
172
static inline bool jsonTokenIsValue(enum jtokentype jtt)
173
56.3k
{
174
56.3k
    switch (jtt) {
175
0
    case JTOK_KW_NULL:
  Branch (175:5): [True: 0, False: 56.3k]
176
436
    case JTOK_KW_TRUE:
  Branch (176:5): [True: 436, False: 55.9k]
177
4.33k
    case JTOK_KW_FALSE:
  Branch (177:5): [True: 3.89k, False: 52.4k]
178
8.66k
    case JTOK_NUMBER:
  Branch (178:5): [True: 4.33k, False: 52.0k]
179
26.0k
    case JTOK_STRING:
  Branch (179:5): [True: 17.3k, False: 39.0k]
180
26.0k
        return true;
181
182
30.3k
    default:
  Branch (182:5): [True: 30.3k, False: 26.0k]
183
30.3k
        return false;
184
56.3k
    }
185
186
    // not reached
187
56.3k
}
Unexecuted instantiation: addition_overflow.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: addrman.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: autofile.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: banman.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: bip324.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: bitdeque.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: bitset.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: block_header.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: block_index.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: block_index_tree.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: blockfilter.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: bloom_filter.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: buffered_file.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: chain.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: checkqueue.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: cmpctblock.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: coins_view.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: coinscache_sim.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: connman.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: crypto.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: crypto_aes256.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: crypto_aes256cbc.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: crypto_chacha20.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: crypto_chacha20poly1305.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: crypto_common.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: crypto_diff_fuzz_chacha20.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: crypto_hkdf_hmac_sha256_l32.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: crypto_poly1305.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: cuckoocache.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: dbwrapper.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: deserialize.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: feefrac.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: fee_rate.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: feeratediagram.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: fees.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: flatfile.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: float.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: golomb_rice.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: headerssync.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: hex.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: http_request.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: i2p.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: integer.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: key.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: kitchen_sink.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: load_external_block_file.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: merkle.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: merkleblock.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: message.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: miniscript.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: minisketch.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: mini_miner.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: muhash.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: multiplication_overflow.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: net.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: net_permissions.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: netaddress.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: netbase_dns_lookup.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: node_eviction.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: p2p_handshake.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: p2p_headers_presync.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: p2p_transport_serialization.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: pcp.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: package_eval.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: parse_hd_keypath.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: parse_univalue.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: partially_downloaded_block.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: policy_estimator.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: policy_estimator_io.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: poolresource.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: pow.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: primitives_transaction.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: private_broadcast.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: process_message.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: process_messages.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: protocol.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: random.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: rbf.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: rolling_bloom_filter.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: rpc.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: script.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: script_assets_test_minimizer.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: script_descriptor_cache.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: script_format.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: script_interpreter.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: script_ops.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: script_sigcache.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: script_sign.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: scriptnum_ops.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: secp256k1_ec_seckey_import_export_der.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: secp256k1_ecdsa_signature_parse_der_lax.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: signature_checker.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: signet.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: socks5.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: span.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: string.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: strprintf.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: system.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: torcontrol.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: transaction.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: txdownloadman.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: tx_pool.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: txorphan.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: utxo_snapshot.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: utxo_total_supply.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: validation_load_mempool.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: vecdeque.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: versionbits.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: ipc.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: coincontrol.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: coinselection.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: crypter.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: scriptpubkeyman.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: spend.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: wallet_bdb_parser.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: ipc_fuzz.capnp.proxy-client.c++:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: ipc_fuzz.capnp.proxy-types.c++:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: ipc_fuzz.capnp.proxy-server.c++:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: mempool.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: threadinterrupt.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: util.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: client.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: args.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: settings.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: core_io.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: request.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: config.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: univalue.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: univalue_get.cpp:_ZL16jsonTokenIsValue10jtokentype
univalue_read.cpp:_ZL16jsonTokenIsValue10jtokentype
Line
Count
Source
173
56.3k
{
174
56.3k
    switch (jtt) {
175
0
    case JTOK_KW_NULL:
  Branch (175:5): [True: 0, False: 56.3k]
176
436
    case JTOK_KW_TRUE:
  Branch (176:5): [True: 436, False: 55.9k]
177
4.33k
    case JTOK_KW_FALSE:
  Branch (177:5): [True: 3.89k, False: 52.4k]
178
8.66k
    case JTOK_NUMBER:
  Branch (178:5): [True: 4.33k, False: 52.0k]
179
26.0k
    case JTOK_STRING:
  Branch (179:5): [True: 17.3k, False: 39.0k]
180
26.0k
        return true;
181
182
30.3k
    default:
  Branch (182:5): [True: 30.3k, False: 26.0k]
183
30.3k
        return false;
184
56.3k
    }
185
186
    // not reached
187
56.3k
}
Unexecuted instantiation: univalue_write.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: wallet.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: external_signer_scriptpubkeyman.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: interfaces.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: load.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: addresses.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: backup.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: coins.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: encrypt.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: signmessage.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: transactions.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: setup_common.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: addrdb.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: init.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: warnings.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: rest.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: blockchain.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: mining.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: node.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: output_script.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: rawtransaction.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: server.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: server_util.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: txoutproof.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: httprpc.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: external_signer.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: net_types.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: rawtransaction_util.cpp:_ZL16jsonTokenIsValue10jtokentype
Unexecuted instantiation: run_command.cpp:_ZL16jsonTokenIsValue10jtokentype
188
189
static inline bool json_isspace(int ch)
190
58.5k
{
191
58.5k
    switch (ch) {
192
0
    case 0x20:
  Branch (192:5): [True: 0, False: 0]
  Branch (192:5): [True: 0, False: 58.5k]
193
0
    case 0x09:
  Branch (193:5): [True: 0, False: 0]
  Branch (193:5): [True: 0, False: 58.5k]
194
0
    case 0x0a:
  Branch (194:5): [True: 0, False: 0]
  Branch (194:5): [True: 0, False: 58.5k]
195
0
    case 0x0d:
  Branch (195:5): [True: 0, False: 0]
  Branch (195:5): [True: 0, False: 58.5k]
196
0
        return true;
197
198
58.5k
    default:
  Branch (198:5): [True: 0, False: 0]
  Branch (198:5): [True: 58.5k, False: 0]
199
58.5k
        return false;
200
58.5k
    }
201
202
    // not reached
203
58.5k
}
Unexecuted instantiation: addition_overflow.cpp:_ZL12json_isspacei
Unexecuted instantiation: addrman.cpp:_ZL12json_isspacei
Unexecuted instantiation: autofile.cpp:_ZL12json_isspacei
Unexecuted instantiation: banman.cpp:_ZL12json_isspacei
Unexecuted instantiation: bip324.cpp:_ZL12json_isspacei
Unexecuted instantiation: bitdeque.cpp:_ZL12json_isspacei
Unexecuted instantiation: bitset.cpp:_ZL12json_isspacei
Unexecuted instantiation: block_header.cpp:_ZL12json_isspacei
Unexecuted instantiation: block_index.cpp:_ZL12json_isspacei
Unexecuted instantiation: block_index_tree.cpp:_ZL12json_isspacei
Unexecuted instantiation: blockfilter.cpp:_ZL12json_isspacei
Unexecuted instantiation: bloom_filter.cpp:_ZL12json_isspacei
Unexecuted instantiation: buffered_file.cpp:_ZL12json_isspacei
Unexecuted instantiation: chain.cpp:_ZL12json_isspacei
Unexecuted instantiation: checkqueue.cpp:_ZL12json_isspacei
Unexecuted instantiation: cmpctblock.cpp:_ZL12json_isspacei
Unexecuted instantiation: coins_view.cpp:_ZL12json_isspacei
Unexecuted instantiation: coinscache_sim.cpp:_ZL12json_isspacei
Unexecuted instantiation: connman.cpp:_ZL12json_isspacei
Unexecuted instantiation: crypto.cpp:_ZL12json_isspacei
Unexecuted instantiation: crypto_aes256.cpp:_ZL12json_isspacei
Unexecuted instantiation: crypto_aes256cbc.cpp:_ZL12json_isspacei
Unexecuted instantiation: crypto_chacha20.cpp:_ZL12json_isspacei
Unexecuted instantiation: crypto_chacha20poly1305.cpp:_ZL12json_isspacei
Unexecuted instantiation: crypto_common.cpp:_ZL12json_isspacei
Unexecuted instantiation: crypto_diff_fuzz_chacha20.cpp:_ZL12json_isspacei
Unexecuted instantiation: crypto_hkdf_hmac_sha256_l32.cpp:_ZL12json_isspacei
Unexecuted instantiation: crypto_poly1305.cpp:_ZL12json_isspacei
Unexecuted instantiation: cuckoocache.cpp:_ZL12json_isspacei
Unexecuted instantiation: dbwrapper.cpp:_ZL12json_isspacei
Unexecuted instantiation: deserialize.cpp:_ZL12json_isspacei
Unexecuted instantiation: feefrac.cpp:_ZL12json_isspacei
Unexecuted instantiation: fee_rate.cpp:_ZL12json_isspacei
Unexecuted instantiation: feeratediagram.cpp:_ZL12json_isspacei
Unexecuted instantiation: fees.cpp:_ZL12json_isspacei
Unexecuted instantiation: flatfile.cpp:_ZL12json_isspacei
Unexecuted instantiation: float.cpp:_ZL12json_isspacei
Unexecuted instantiation: golomb_rice.cpp:_ZL12json_isspacei
Unexecuted instantiation: headerssync.cpp:_ZL12json_isspacei
Unexecuted instantiation: hex.cpp:_ZL12json_isspacei
Unexecuted instantiation: http_request.cpp:_ZL12json_isspacei
Unexecuted instantiation: i2p.cpp:_ZL12json_isspacei
Unexecuted instantiation: integer.cpp:_ZL12json_isspacei
Unexecuted instantiation: key.cpp:_ZL12json_isspacei
Unexecuted instantiation: kitchen_sink.cpp:_ZL12json_isspacei
Unexecuted instantiation: load_external_block_file.cpp:_ZL12json_isspacei
Unexecuted instantiation: merkle.cpp:_ZL12json_isspacei
Unexecuted instantiation: merkleblock.cpp:_ZL12json_isspacei
Unexecuted instantiation: message.cpp:_ZL12json_isspacei
Unexecuted instantiation: miniscript.cpp:_ZL12json_isspacei
Unexecuted instantiation: minisketch.cpp:_ZL12json_isspacei
Unexecuted instantiation: mini_miner.cpp:_ZL12json_isspacei
Unexecuted instantiation: muhash.cpp:_ZL12json_isspacei
Unexecuted instantiation: multiplication_overflow.cpp:_ZL12json_isspacei
Unexecuted instantiation: net.cpp:_ZL12json_isspacei
Unexecuted instantiation: net_permissions.cpp:_ZL12json_isspacei
Unexecuted instantiation: netaddress.cpp:_ZL12json_isspacei
Unexecuted instantiation: netbase_dns_lookup.cpp:_ZL12json_isspacei
Unexecuted instantiation: node_eviction.cpp:_ZL12json_isspacei
Unexecuted instantiation: p2p_handshake.cpp:_ZL12json_isspacei
Unexecuted instantiation: p2p_headers_presync.cpp:_ZL12json_isspacei
Unexecuted instantiation: p2p_transport_serialization.cpp:_ZL12json_isspacei
Unexecuted instantiation: pcp.cpp:_ZL12json_isspacei
Unexecuted instantiation: package_eval.cpp:_ZL12json_isspacei
Unexecuted instantiation: parse_hd_keypath.cpp:_ZL12json_isspacei
Unexecuted instantiation: parse_univalue.cpp:_ZL12json_isspacei
Unexecuted instantiation: partially_downloaded_block.cpp:_ZL12json_isspacei
Unexecuted instantiation: policy_estimator.cpp:_ZL12json_isspacei
Unexecuted instantiation: policy_estimator_io.cpp:_ZL12json_isspacei
Unexecuted instantiation: poolresource.cpp:_ZL12json_isspacei
Unexecuted instantiation: pow.cpp:_ZL12json_isspacei
Unexecuted instantiation: primitives_transaction.cpp:_ZL12json_isspacei
Unexecuted instantiation: private_broadcast.cpp:_ZL12json_isspacei
Unexecuted instantiation: process_message.cpp:_ZL12json_isspacei
Unexecuted instantiation: process_messages.cpp:_ZL12json_isspacei
Unexecuted instantiation: protocol.cpp:_ZL12json_isspacei
Unexecuted instantiation: random.cpp:_ZL12json_isspacei
Unexecuted instantiation: rbf.cpp:_ZL12json_isspacei
Unexecuted instantiation: rolling_bloom_filter.cpp:_ZL12json_isspacei
Unexecuted instantiation: rpc.cpp:_ZL12json_isspacei
Unexecuted instantiation: script.cpp:_ZL12json_isspacei
Unexecuted instantiation: script_assets_test_minimizer.cpp:_ZL12json_isspacei
Unexecuted instantiation: script_descriptor_cache.cpp:_ZL12json_isspacei
Unexecuted instantiation: script_format.cpp:_ZL12json_isspacei
Unexecuted instantiation: script_interpreter.cpp:_ZL12json_isspacei
Unexecuted instantiation: script_ops.cpp:_ZL12json_isspacei
Unexecuted instantiation: script_sigcache.cpp:_ZL12json_isspacei
Unexecuted instantiation: script_sign.cpp:_ZL12json_isspacei
Unexecuted instantiation: scriptnum_ops.cpp:_ZL12json_isspacei
Unexecuted instantiation: secp256k1_ec_seckey_import_export_der.cpp:_ZL12json_isspacei
Unexecuted instantiation: secp256k1_ecdsa_signature_parse_der_lax.cpp:_ZL12json_isspacei
Unexecuted instantiation: signature_checker.cpp:_ZL12json_isspacei
Unexecuted instantiation: signet.cpp:_ZL12json_isspacei
Unexecuted instantiation: socks5.cpp:_ZL12json_isspacei
Unexecuted instantiation: span.cpp:_ZL12json_isspacei
Unexecuted instantiation: string.cpp:_ZL12json_isspacei
Unexecuted instantiation: strprintf.cpp:_ZL12json_isspacei
Unexecuted instantiation: system.cpp:_ZL12json_isspacei
Unexecuted instantiation: torcontrol.cpp:_ZL12json_isspacei
Unexecuted instantiation: transaction.cpp:_ZL12json_isspacei
Unexecuted instantiation: txdownloadman.cpp:_ZL12json_isspacei
Unexecuted instantiation: tx_pool.cpp:_ZL12json_isspacei
Unexecuted instantiation: txorphan.cpp:_ZL12json_isspacei
Unexecuted instantiation: utxo_snapshot.cpp:_ZL12json_isspacei
Unexecuted instantiation: utxo_total_supply.cpp:_ZL12json_isspacei
Unexecuted instantiation: validation_load_mempool.cpp:_ZL12json_isspacei
Unexecuted instantiation: vecdeque.cpp:_ZL12json_isspacei
Unexecuted instantiation: versionbits.cpp:_ZL12json_isspacei
Unexecuted instantiation: ipc.cpp:_ZL12json_isspacei
Unexecuted instantiation: coincontrol.cpp:_ZL12json_isspacei
Unexecuted instantiation: coinselection.cpp:_ZL12json_isspacei
Unexecuted instantiation: crypter.cpp:_ZL12json_isspacei
Unexecuted instantiation: scriptpubkeyman.cpp:_ZL12json_isspacei
Unexecuted instantiation: spend.cpp:_ZL12json_isspacei
Unexecuted instantiation: wallet_bdb_parser.cpp:_ZL12json_isspacei
Unexecuted instantiation: ipc_fuzz.capnp.proxy-client.c++:_ZL12json_isspacei
Unexecuted instantiation: ipc_fuzz.capnp.proxy-types.c++:_ZL12json_isspacei
Unexecuted instantiation: ipc_fuzz.capnp.proxy-server.c++:_ZL12json_isspacei
Unexecuted instantiation: mempool.cpp:_ZL12json_isspacei
Unexecuted instantiation: threadinterrupt.cpp:_ZL12json_isspacei
Unexecuted instantiation: util.cpp:_ZL12json_isspacei
Unexecuted instantiation: client.cpp:_ZL12json_isspacei
Unexecuted instantiation: args.cpp:_ZL12json_isspacei
Unexecuted instantiation: settings.cpp:_ZL12json_isspacei
Unexecuted instantiation: core_io.cpp:_ZL12json_isspacei
Unexecuted instantiation: request.cpp:_ZL12json_isspacei
Unexecuted instantiation: config.cpp:_ZL12json_isspacei
Unexecuted instantiation: univalue.cpp:_ZL12json_isspacei
Unexecuted instantiation: univalue_get.cpp:_ZL12json_isspacei
univalue_read.cpp:_ZL12json_isspacei
Line
Count
Source
190
58.5k
{
191
58.5k
    switch (ch) {
192
0
    case 0x20:
  Branch (192:5): [True: 0, False: 58.5k]
193
0
    case 0x09:
  Branch (193:5): [True: 0, False: 58.5k]
194
0
    case 0x0a:
  Branch (194:5): [True: 0, False: 58.5k]
195
0
    case 0x0d:
  Branch (195:5): [True: 0, False: 58.5k]
196
0
        return true;
197
198
58.5k
    default:
  Branch (198:5): [True: 58.5k, False: 0]
199
58.5k
        return false;
200
58.5k
    }
201
202
    // not reached
203
58.5k
}
Unexecuted instantiation: univalue_write.cpp:_ZL12json_isspacei
Unexecuted instantiation: wallet.cpp:_ZL12json_isspacei
Unexecuted instantiation: external_signer_scriptpubkeyman.cpp:_ZL12json_isspacei
Unexecuted instantiation: interfaces.cpp:_ZL12json_isspacei
Unexecuted instantiation: load.cpp:_ZL12json_isspacei
Unexecuted instantiation: addresses.cpp:_ZL12json_isspacei
Unexecuted instantiation: backup.cpp:_ZL12json_isspacei
Unexecuted instantiation: coins.cpp:_ZL12json_isspacei
Unexecuted instantiation: encrypt.cpp:_ZL12json_isspacei
Unexecuted instantiation: signmessage.cpp:_ZL12json_isspacei
Unexecuted instantiation: transactions.cpp:_ZL12json_isspacei
Unexecuted instantiation: setup_common.cpp:_ZL12json_isspacei
Unexecuted instantiation: addrdb.cpp:_ZL12json_isspacei
Unexecuted instantiation: init.cpp:_ZL12json_isspacei
Unexecuted instantiation: warnings.cpp:_ZL12json_isspacei
Unexecuted instantiation: rest.cpp:_ZL12json_isspacei
Unexecuted instantiation: blockchain.cpp:_ZL12json_isspacei
Unexecuted instantiation: mining.cpp:_ZL12json_isspacei
Unexecuted instantiation: node.cpp:_ZL12json_isspacei
Unexecuted instantiation: output_script.cpp:_ZL12json_isspacei
Unexecuted instantiation: rawtransaction.cpp:_ZL12json_isspacei
Unexecuted instantiation: server.cpp:_ZL12json_isspacei
Unexecuted instantiation: server_util.cpp:_ZL12json_isspacei
Unexecuted instantiation: txoutproof.cpp:_ZL12json_isspacei
Unexecuted instantiation: httprpc.cpp:_ZL12json_isspacei
Unexecuted instantiation: external_signer.cpp:_ZL12json_isspacei
Unexecuted instantiation: net_types.cpp:_ZL12json_isspacei
Unexecuted instantiation: rawtransaction_util.cpp:_ZL12json_isspacei
Unexecuted instantiation: run_command.cpp:_ZL12json_isspacei
204
205
extern const UniValue NullUniValue;
206
207
#endif // BITCOIN_UNIVALUE_INCLUDE_UNIVALUE_H