Coverage Report

Created: 2026-09-14 20:36

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/tmp/bitcoin/src/consensus/validation.h
Line
Count
Source
1
// Copyright (c) 2009-2010 Satoshi Nakamoto
2
// Copyright (c) 2009-present The Bitcoin Core developers
3
// Distributed under the MIT software license, see the accompanying
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6
#ifndef BITCOIN_CONSENSUS_VALIDATION_H
7
#define BITCOIN_CONSENSUS_VALIDATION_H
8
9
#include <consensus/consensus.h>
10
#include <primitives/block.h>
11
#include <primitives/transaction.h>
12
#include <script/script.h>
13
#include <serialize.h>
14
15
#include <cstddef>
16
#include <cstdint>
17
#include <string>
18
#include <vector>
19
20
21
/** Index marker for when no witness commitment is present in a coinbase transaction. */
22
inline constexpr int NO_WITNESS_COMMITMENT{-1};
23
24
/** Minimum size of a witness commitment structure. Defined in BIP 141. **/
25
inline constexpr size_t MINIMUM_WITNESS_COMMITMENT{38};
26
27
/** A "reason" why a transaction was invalid, suitable for determining whether the
28
  * provider of the transaction should be banned/ignored/disconnected/etc.
29
  */
30
enum class TxValidationResult {
31
    TX_RESULT_UNSET = 0,     //!< initial value. Tx has not yet been rejected
32
    TX_CONSENSUS,            //!< invalid by consensus rules
33
    TX_INPUTS_NOT_STANDARD,   //!< inputs (covered by txid) failed policy rules
34
    TX_NOT_STANDARD,          //!< otherwise didn't meet our local policy rules
35
    TX_MISSING_INPUTS,        //!< transaction was missing some of its inputs
36
    TX_PREMATURE_SPEND,       //!< transaction spends a coinbase too early, or violates locktime/sequence locks
37
    /**
38
     * Transaction might have a witness prior to SegWit
39
     * activation, or witness may have been malleated (which includes
40
     * non-standard witnesses).
41
     */
42
    TX_WITNESS_MUTATED,
43
    /**
44
     * Transaction is missing a witness.
45
     */
46
    TX_WITNESS_STRIPPED,
47
    /**
48
     * Tx already in mempool or conflicts with a tx in the chain
49
     * (if it conflicts with another tx in mempool, we use MEMPOOL_POLICY as it failed to reach the RBF threshold)
50
     * Currently this is only used if the transaction already exists in the mempool or on chain.
51
     */
52
    TX_CONFLICT,
53
    TX_MEMPOOL_POLICY,        //!< violated mempool's fee/size/descendant/RBF/etc limits
54
    TX_NO_MEMPOOL,            //!< this node does not have a mempool so can't validate the transaction
55
    TX_RECONSIDERABLE,        //!< fails some policy, but might be acceptable if submitted in a (different) package
56
    TX_UNKNOWN,               //!< transaction was not validated because package failed
57
};
58
59
/** A "reason" why a block was invalid, suitable for determining whether the
60
  * provider of the block should be banned/ignored/disconnected/etc.
61
  * These are much more granular than the rejection codes, which may be more
62
  * useful for some other use-cases.
63
  */
64
enum class BlockValidationResult {
65
    BLOCK_RESULT_UNSET = 0,  //!< initial value. Block has not yet been rejected
66
    BLOCK_CONSENSUS,         //!< invalid by consensus rules (excluding any below reasons)
67
    BLOCK_CACHED_INVALID,    //!< this block was cached as being invalid and we didn't store the reason why
68
    BLOCK_INVALID_HEADER,    //!< invalid proof of work or time too old
69
    BLOCK_MUTATED,           //!< the block's data didn't match the data committed to by the PoW
70
    BLOCK_MISSING_PREV,      //!< We don't have the previous block the checked one is built on
71
    BLOCK_INVALID_PREV,      //!< A block this one builds on is invalid
72
    BLOCK_TIME_FUTURE,       //!< block timestamp was > 2 hours in the future (or our clock is bad)
73
    BLOCK_HEADER_LOW_WORK    //!< the block header may be on a too-little-work chain
74
};
75
76
77
78
/** Template for capturing information about block/transaction validation. This is instantiated
79
 *  by TxValidationState and BlockValidationState for validation information on transactions
80
 *  and blocks respectively. */
81
template <typename Result>
82
class ValidationState
83
{
84
private:
85
    enum class ModeState {
86
        M_VALID,   //!< everything ok
87
        M_INVALID, //!< network rule violation (DoS value may be set)
88
        M_ERROR,   //!< run-time error
89
    } m_mode{ModeState::M_VALID};
90
    Result m_result{};
91
    std::string m_reject_reason;
92
    std::string m_debug_message;
93
94
public:
95
    bool Invalid(Result result,
96
                 const std::string& reject_reason = "",
97
                 const std::string& debug_message = "")
98
56.5k
    {
99
56.5k
        m_result = result;
100
56.5k
        m_reject_reason = reject_reason;
101
56.5k
        m_debug_message = debug_message;
102
56.5k
        if (m_mode != ModeState::M_ERROR) m_mode = ModeState::M_INVALID;
103
56.5k
        return false;
104
56.5k
    }
ValidationState<TxValidationResult>::Invalid(TxValidationResult, 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&)
Line
Count
Source
98
52.4k
    {
99
52.4k
        m_result = result;
100
52.4k
        m_reject_reason = reject_reason;
101
52.4k
        m_debug_message = debug_message;
102
52.4k
        if (m_mode != ModeState::M_ERROR) m_mode = ModeState::M_INVALID;
103
52.4k
        return false;
104
52.4k
    }
ValidationState<PackageValidationResult>::Invalid(PackageValidationResult, 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&)
Line
Count
Source
98
324
    {
99
324
        m_result = result;
100
324
        m_reject_reason = reject_reason;
101
324
        m_debug_message = debug_message;
102
324
        if (m_mode != ModeState::M_ERROR) m_mode = ModeState::M_INVALID;
103
324
        return false;
104
324
    }
ValidationState<BlockValidationResult>::Invalid(BlockValidationResult, 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&)
Line
Count
Source
98
3.80k
    {
99
3.80k
        m_result = result;
100
3.80k
        m_reject_reason = reject_reason;
101
3.80k
        m_debug_message = debug_message;
102
3.80k
        if (m_mode != ModeState::M_ERROR) m_mode = ModeState::M_INVALID;
103
3.80k
        return false;
104
3.80k
    }
105
    bool Error(const std::string& reject_reason)
106
1
    {
107
1
        if (m_mode == ModeState::M_VALID)
108
1
            m_reject_reason = reject_reason;
109
1
        m_mode = ModeState::M_ERROR;
110
1
        return false;
111
1
    }
112
726k
    bool IsValid() const { return m_mode == ModeState::M_VALID; }
ValidationState<TxValidationResult>::IsValid() const
Line
Count
Source
112
15.6k
    bool IsValid() const { return m_mode == ModeState::M_VALID; }
ValidationState<PackageValidationResult>::IsValid() const
Line
Count
Source
112
187
    bool IsValid() const { return m_mode == ModeState::M_VALID; }
ValidationState<BlockValidationResult>::IsValid() const
Line
Count
Source
112
710k
    bool IsValid() const { return m_mode == ModeState::M_VALID; }
113
171k
    bool IsInvalid() const { return m_mode == ModeState::M_INVALID; }
ValidationState<TxValidationResult>::IsInvalid() const
Line
Count
Source
113
63.2k
    bool IsInvalid() const { return m_mode == ModeState::M_INVALID; }
ValidationState<PackageValidationResult>::IsInvalid() const
Line
Count
Source
113
222
    bool IsInvalid() const { return m_mode == ModeState::M_INVALID; }
ValidationState<BlockValidationResult>::IsInvalid() const
Line
Count
Source
113
108k
    bool IsInvalid() const { return m_mode == ModeState::M_INVALID; }
114
4.97k
    bool IsError() const { return m_mode == ModeState::M_ERROR; }
115
24.2k
    Result GetResult() const { return m_result; }
ValidationState<TxValidationResult>::GetResult() const
Line
Count
Source
115
15.9k
    Result GetResult() const { return m_result; }
ValidationState<PackageValidationResult>::GetResult() const
Line
Count
Source
115
2.17k
    Result GetResult() const { return m_result; }
ValidationState<BlockValidationResult>::GetResult() const
Line
Count
Source
115
6.11k
    Result GetResult() const { return m_result; }
116
3.77k
    std::string GetRejectReason() const { return m_reject_reason; }
ValidationState<TxValidationResult>::GetRejectReason[abi:cxx11]() const
Line
Count
Source
116
826
    std::string GetRejectReason() const { return m_reject_reason; }
ValidationState<PackageValidationResult>::GetRejectReason[abi:cxx11]() const
Line
Count
Source
116
13
    std::string GetRejectReason() const { return m_reject_reason; }
ValidationState<BlockValidationResult>::GetRejectReason[abi:cxx11]() const
Line
Count
Source
116
2.93k
    std::string GetRejectReason() const { return m_reject_reason; }
117
691
    std::string GetDebugMessage() const { return m_debug_message; }
ValidationState<TxValidationResult>::GetDebugMessage[abi:cxx11]() const
Line
Count
Source
117
679
    std::string GetDebugMessage() const { return m_debug_message; }
ValidationState<BlockValidationResult>::GetDebugMessage[abi:cxx11]() const
Line
Count
Source
117
12
    std::string GetDebugMessage() const { return m_debug_message; }
118
    std::string ToString() const
119
146k
    {
120
146k
        if (IsValid()) {
121
130k
            return "Valid";
122
130k
        }
123
124
15.5k
        if (!m_debug_message.empty()) {
125
11.9k
            return m_reject_reason + ", " + m_debug_message;
126
11.9k
        }
127
128
3.58k
        return m_reject_reason;
129
15.5k
    }
ValidationState<PackageValidationResult>::ToString[abi:cxx11]() const
Line
Count
Source
119
146
    {
120
146
        if (IsValid()) {
121
1
            return "Valid";
122
1
        }
123
124
145
        if (!m_debug_message.empty()) {
125
23
            return m_reject_reason + ", " + m_debug_message;
126
23
        }
127
128
122
        return m_reject_reason;
129
145
    }
ValidationState<TxValidationResult>::ToString[abi:cxx11]() const
Line
Count
Source
119
5.54k
    {
120
5.54k
        if (IsValid()) {
121
2
            return "Valid";
122
2
        }
123
124
5.54k
        if (!m_debug_message.empty()) {
125
2.08k
            return m_reject_reason + ", " + m_debug_message;
126
2.08k
        }
127
128
3.45k
        return m_reject_reason;
129
5.54k
    }
ValidationState<BlockValidationResult>::ToString[abi:cxx11]() const
Line
Count
Source
119
140k
    {
120
140k
        if (IsValid()) {
121
130k
            return "Valid";
122
130k
        }
123
124
9.89k
        if (!m_debug_message.empty()) {
125
9.88k
            return m_reject_reason + ", " + m_debug_message;
126
9.88k
        }
127
128
9
        return m_reject_reason;
129
9.89k
    }
130
};
131
132
class TxValidationState : public ValidationState<TxValidationResult> {};
133
class BlockValidationState : public ValidationState<BlockValidationResult> {};
134
135
// These implement the weight = (stripped_size * 4) + witness_size formula,
136
// using only serialization with and without witness data. As witness_size
137
// is equal to total_size - stripped_size, this formula is identical to:
138
// weight = (stripped_size * 3) + total_size.
139
static inline int32_t GetTransactionWeight(const CTransaction& tx)
140
1.05M
{
141
1.05M
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
1.05M
}
Unexecuted instantiation: main.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: addrman_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: argsman_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: banman_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: base58_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: baseindex_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: bip32_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: bip324_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: blockchain_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: blockencodings_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: blockfilter_index_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: blockmanager_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: blockpolicyestimator_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: bloom_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: btcsignals_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: chain_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: chainstate_write_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: checkqueue_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: cluster_linearize_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: coins_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: coinstatsindex_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: compress_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: crypto_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: cuckoocache_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: dbwrapper_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: denialofservice_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: descriptor_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: disconnected_transactions.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: flatfile_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: fs_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: getarg_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: hash_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: headers_sync_chainwork_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: httpserver_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: i2p_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: interfaces_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: key_io_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: key_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: logging_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: mempool_tests.cpp:GetTransactionWeight(CTransaction const&)
mempool_fee_estimator_tests.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
169k
{
141
169k
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
169k
}
Unexecuted instantiation: merkle_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: merkleblock_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: miner_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: miniminer_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: miniscript_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: minisketch_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: multisig_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: bip328_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: net_peer_connection_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: net_peer_eviction_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: net_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: netbase_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: node_init_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: node_warnings_tests.cpp:GetTransactionWeight(CTransaction const&)
orphanage_tests.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
103
{
141
103
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
103
}
Unexecuted instantiation: pcp_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: peerman_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: pmt_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: pool_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: pow_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: prevector_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: private_broadcast_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: psbt_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: random_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: rbf_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: rest_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: rpc_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: sanity_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: script_p2sh_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: script_segwit_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: script_standard_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: script_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: scriptnum_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: serfloat_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: serialize_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: settings_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: sighash_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: sigopcount_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: skiplist_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: sock_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: streams_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: system_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: testnet4_miner_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: timeoffsets_tests.cpp:GetTransactionWeight(CTransaction const&)
transaction_tests.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
2
{
141
2
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
2
}
Unexecuted instantiation: txdownload_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: txindex_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: txospenderindex_tests.cpp:GetTransactionWeight(CTransaction const&)
txpackage_tests.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
1
{
141
1
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
1
}
Unexecuted instantiation: txreconciliation_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: txrequest_tests.cpp:GetTransactionWeight(CTransaction const&)
txvalidation_tests.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
1
{
141
1
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
1
}
Unexecuted instantiation: txvalidationcache_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: util_expected_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: util_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: util_trace_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: validation_block_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: validation_chainstate_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: validation_chainstatemanager_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: validation_flush_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: validation_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: validationinterface_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: versionbits_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: init_test_fixture.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: wallet_test_fixture.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: db_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: coinselector_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: coinselection_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: feebumper_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: group_outputs_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: init_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: ismine_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: psbt_wallet_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: scriptpubkeyman_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: spend_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: wallet_crypto_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: wallet_interfaces_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: wallet_rpc_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: wallet_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: wallet_transaction_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: walletdb_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: walletload_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: ipc_tests.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: ipc_test.capnp.proxy-client.c++:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: ipc_test.capnp.proxy-server.c++:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: ipc_test.capnp.proxy-types.c++:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: blockfilter.cpp:GetTransactionWeight(CTransaction const&)
mining.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
109
{
141
109
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
109
}
Unexecuted instantiation: net.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: setup_common.cpp:GetTransactionWeight(CTransaction const&)
transaction_utils.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
21
{
141
21
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
21
}
txmempool.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
338k
{
141
338k
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
338k
}
Unexecuted instantiation: validation.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: util.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: blockencodings.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: tx_verify.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: base.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: coinstatsindex.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: txindex.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: txospenderindex.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: init.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: coinstats.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: net_processing.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: blockmanager_args.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: blockstorage.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: chainstate.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: chainstatemanager_args.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: context.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: interfaces.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: mempool_args.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: mempool_persist.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: mempool_persist_args.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: miner.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: mining_args.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: mini_miner.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: peerman_args.cpp:GetTransactionWeight(CTransaction const&)
transaction.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
24
{
141
24
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
24
}
Unexecuted instantiation: txdownloadman_impl.cpp:GetTransactionWeight(CTransaction const&)
txorphanage.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
5.33k
{
141
5.33k
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
5.33k
}
Unexecuted instantiation: utxo_snapshot.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: ephemeral_policy.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: block_policy_estimator.cpp:GetTransactionWeight(CTransaction const&)
mempool_estimator.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
396k
{
141
396k
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
396k
}
packages.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
1.40k
{
141
1.40k
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
1.40k
}
Unexecuted instantiation: rbf.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: settings.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: truc_policy.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: rest.cpp:GetTransactionWeight(CTransaction const&)
blockchain.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
44
{
141
44
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
44
}
Unexecuted instantiation: fees.cpp:GetTransactionWeight(CTransaction const&)
mempool.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
43
{
141
43
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
43
}
Unexecuted instantiation: node.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: rawtransaction.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: server.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: server_util.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: txoutproof.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: signet.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: validationinterface.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: coin.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: psbt.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: tx_check.cpp:GetTransactionWeight(CTransaction const&)
spend.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
2.56k
{
141
2.56k
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
2.56k
}
Unexecuted instantiation: wallet.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: feebumper.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: transactions.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: protocol.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: process.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: init.capnp.proxy-client.c++:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: init.capnp.proxy-types.c++:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: mining.capnp.proxy-types.c++:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: init.capnp.proxy-server.c++:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: mining.capnp.proxy-client.c++:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: mining.capnp.proxy-server.c++:GetTransactionWeight(CTransaction const&)
core_io.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
17.2k
{
141
17.2k
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
17.2k
}
policy.cpp:GetTransactionWeight(CTransaction const&)
Line
Count
Source
140
122k
{
141
122k
    return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx));
142
122k
}
Unexecuted instantiation: rawtransaction_util.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: descriptor.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: miniscript.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: sign.cpp:GetTransactionWeight(CTransaction const&)
Unexecuted instantiation: bitcoind.cpp:GetTransactionWeight(CTransaction const&)
143
static inline int64_t GetBlockWeight(const CBlock& block)
144
193k
{
145
193k
    return ::GetSerializeSize(TX_NO_WITNESS(block)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(block));
146
193k
}
Unexecuted instantiation: main.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: addrman_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: argsman_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: banman_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: base58_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: baseindex_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: bip32_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: bip324_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: blockchain_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: blockencodings_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: blockfilter_index_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: blockmanager_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: blockpolicyestimator_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: bloom_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: btcsignals_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: chain_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: chainstate_write_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: checkqueue_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: cluster_linearize_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: coins_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: coinstatsindex_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: compress_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: crypto_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: cuckoocache_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: dbwrapper_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: denialofservice_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: descriptor_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: disconnected_transactions.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: flatfile_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: fs_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: getarg_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: hash_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: headers_sync_chainwork_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: httpserver_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: i2p_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: interfaces_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: key_io_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: key_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: logging_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: mempool_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: mempool_fee_estimator_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: merkle_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: merkleblock_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: miner_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: miniminer_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: miniscript_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: minisketch_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: multisig_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: bip328_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: net_peer_connection_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: net_peer_eviction_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: net_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: netbase_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: node_init_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: node_warnings_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: orphanage_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: pcp_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: peerman_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: pmt_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: pool_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: pow_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: prevector_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: private_broadcast_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: psbt_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: random_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: rbf_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: rest_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: rpc_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: sanity_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: script_p2sh_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: script_segwit_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: script_standard_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: script_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: scriptnum_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: serfloat_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: serialize_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: settings_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: sighash_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: sigopcount_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: skiplist_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: sock_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: streams_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: system_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: testnet4_miner_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: timeoffsets_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: transaction_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: txdownload_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: txindex_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: txospenderindex_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: txpackage_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: txreconciliation_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: txrequest_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: txvalidation_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: txvalidationcache_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: util_expected_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: util_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: util_trace_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: validation_block_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: validation_chainstate_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: validation_chainstatemanager_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: validation_flush_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: validation_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: validationinterface_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: versionbits_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: init_test_fixture.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: wallet_test_fixture.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: db_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: coinselector_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: coinselection_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: feebumper_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: group_outputs_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: init_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: ismine_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: psbt_wallet_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: scriptpubkeyman_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: spend_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: wallet_crypto_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: wallet_interfaces_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: wallet_rpc_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: wallet_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: wallet_transaction_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: walletdb_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: walletload_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: ipc_tests.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: ipc_test.capnp.proxy-client.c++:GetBlockWeight(CBlock const&)
Unexecuted instantiation: ipc_test.capnp.proxy-server.c++:GetBlockWeight(CBlock const&)
Unexecuted instantiation: ipc_test.capnp.proxy-types.c++:GetBlockWeight(CBlock const&)
Unexecuted instantiation: blockfilter.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: mining.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: net.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: setup_common.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: transaction_utils.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: txmempool.cpp:GetBlockWeight(CBlock const&)
validation.cpp:GetBlockWeight(CBlock const&)
Line
Count
Source
144
148k
{
145
148k
    return ::GetSerializeSize(TX_NO_WITNESS(block)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(block));
146
148k
}
Unexecuted instantiation: util.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: blockencodings.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: tx_verify.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: base.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: coinstatsindex.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: txindex.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: txospenderindex.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: init.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: coinstats.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: net_processing.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: blockmanager_args.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: blockstorage.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: chainstate.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: chainstatemanager_args.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: context.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: interfaces.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: mempool_args.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: mempool_persist.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: mempool_persist_args.cpp:GetBlockWeight(CBlock const&)
miner.cpp:GetBlockWeight(CBlock const&)
Line
Count
Source
144
43.7k
{
145
43.7k
    return ::GetSerializeSize(TX_NO_WITNESS(block)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(block));
146
43.7k
}
Unexecuted instantiation: mining_args.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: mini_miner.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: peerman_args.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: transaction.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: txdownloadman_impl.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: txorphanage.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: utxo_snapshot.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: ephemeral_policy.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: block_policy_estimator.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: mempool_estimator.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: packages.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: rbf.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: settings.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: truc_policy.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: rest.cpp:GetBlockWeight(CBlock const&)
blockchain.cpp:GetBlockWeight(CBlock const&)
Line
Count
Source
144
1.57k
{
145
1.57k
    return ::GetSerializeSize(TX_NO_WITNESS(block)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(block));
146
1.57k
}
Unexecuted instantiation: fees.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: mempool.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: node.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: rawtransaction.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: server.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: server_util.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: txoutproof.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: signet.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: validationinterface.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: coin.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: psbt.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: tx_check.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: spend.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: wallet.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: feebumper.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: transactions.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: protocol.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: process.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: init.capnp.proxy-client.c++:GetBlockWeight(CBlock const&)
Unexecuted instantiation: init.capnp.proxy-types.c++:GetBlockWeight(CBlock const&)
Unexecuted instantiation: mining.capnp.proxy-types.c++:GetBlockWeight(CBlock const&)
Unexecuted instantiation: init.capnp.proxy-server.c++:GetBlockWeight(CBlock const&)
Unexecuted instantiation: mining.capnp.proxy-client.c++:GetBlockWeight(CBlock const&)
Unexecuted instantiation: mining.capnp.proxy-server.c++:GetBlockWeight(CBlock const&)
Unexecuted instantiation: core_io.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: policy.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: rawtransaction_util.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: descriptor.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: miniscript.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: sign.cpp:GetBlockWeight(CBlock const&)
Unexecuted instantiation: bitcoind.cpp:GetBlockWeight(CBlock const&)
147
static inline int64_t GetTransactionInputWeight(const CTxIn& txin)
148
2.49k
{
149
    // scriptWitness size is added here because witnesses and txins are split up in segwit serialization.
150
2.49k
    return ::GetSerializeSize(TX_NO_WITNESS(txin)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(txin)) + ::GetSerializeSize(txin.scriptWitness.stack);
151
2.49k
}
Unexecuted instantiation: main.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: addrman_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: argsman_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: banman_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: base58_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: baseindex_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: bip32_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: bip324_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: blockchain_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: blockencodings_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: blockfilter_index_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: blockmanager_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: blockpolicyestimator_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: bloom_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: btcsignals_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: chain_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: chainstate_write_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: checkqueue_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: cluster_linearize_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: coins_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: coinstatsindex_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: compress_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: crypto_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: cuckoocache_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: dbwrapper_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: denialofservice_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: descriptor_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: disconnected_transactions.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: flatfile_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: fs_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: getarg_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: hash_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: headers_sync_chainwork_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: httpserver_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: i2p_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: interfaces_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: key_io_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: key_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: logging_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: mempool_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: mempool_fee_estimator_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: merkle_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: merkleblock_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: miner_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: miniminer_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: miniscript_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: minisketch_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: multisig_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: bip328_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: net_peer_connection_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: net_peer_eviction_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: net_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: netbase_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: node_init_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: node_warnings_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: orphanage_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: pcp_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: peerman_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: pmt_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: pool_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: pow_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: prevector_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: private_broadcast_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: psbt_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: random_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: rbf_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: rest_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: rpc_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: sanity_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: script_p2sh_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: script_segwit_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: script_standard_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: script_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: scriptnum_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: serfloat_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: serialize_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: settings_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: sighash_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: sigopcount_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: skiplist_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: sock_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: streams_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: system_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: testnet4_miner_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: timeoffsets_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: transaction_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: txdownload_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: txindex_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: txospenderindex_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: txpackage_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: txreconciliation_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: txrequest_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: txvalidation_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: txvalidationcache_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: util_expected_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: util_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: util_trace_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: validation_block_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: validation_chainstate_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: validation_chainstatemanager_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: validation_flush_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: validation_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: validationinterface_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: versionbits_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: init_test_fixture.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: wallet_test_fixture.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: db_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: coinselector_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: coinselection_tests.cpp:GetTransactionInputWeight(CTxIn const&)
feebumper_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Line
Count
Source
148
4
{
149
    // scriptWitness size is added here because witnesses and txins are split up in segwit serialization.
150
4
    return ::GetSerializeSize(TX_NO_WITNESS(txin)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(txin)) + ::GetSerializeSize(txin.scriptWitness.stack);
151
4
}
Unexecuted instantiation: group_outputs_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: init_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: ismine_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: psbt_wallet_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: scriptpubkeyman_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: spend_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: wallet_crypto_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: wallet_interfaces_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: wallet_rpc_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: wallet_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: wallet_transaction_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: walletdb_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: walletload_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: ipc_tests.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: ipc_test.capnp.proxy-client.c++:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: ipc_test.capnp.proxy-server.c++:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: ipc_test.capnp.proxy-types.c++:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: blockfilter.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: mining.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: net.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: setup_common.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: transaction_utils.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: txmempool.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: validation.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: util.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: blockencodings.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: tx_verify.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: base.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: coinstatsindex.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: txindex.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: txospenderindex.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: init.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: coinstats.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: net_processing.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: blockmanager_args.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: blockstorage.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: chainstate.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: chainstatemanager_args.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: context.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: interfaces.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: mempool_args.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: mempool_persist.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: mempool_persist_args.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: miner.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: mining_args.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: mini_miner.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: peerman_args.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: transaction.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: txdownloadman_impl.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: txorphanage.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: utxo_snapshot.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: ephemeral_policy.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: block_policy_estimator.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: mempool_estimator.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: packages.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: rbf.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: settings.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: truc_policy.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: rest.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: blockchain.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: fees.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: mempool.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: node.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: rawtransaction.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: server.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: server_util.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: txoutproof.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: signet.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: validationinterface.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: coin.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: psbt.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: tx_check.cpp:GetTransactionInputWeight(CTxIn const&)
spend.cpp:GetTransactionInputWeight(CTxIn const&)
Line
Count
Source
148
2.48k
{
149
    // scriptWitness size is added here because witnesses and txins are split up in segwit serialization.
150
2.48k
    return ::GetSerializeSize(TX_NO_WITNESS(txin)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(txin)) + ::GetSerializeSize(txin.scriptWitness.stack);
151
2.48k
}
Unexecuted instantiation: wallet.cpp:GetTransactionInputWeight(CTxIn const&)
feebumper.cpp:GetTransactionInputWeight(CTxIn const&)
Line
Count
Source
148
3
{
149
    // scriptWitness size is added here because witnesses and txins are split up in segwit serialization.
150
3
    return ::GetSerializeSize(TX_NO_WITNESS(txin)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(txin)) + ::GetSerializeSize(txin.scriptWitness.stack);
151
3
}
Unexecuted instantiation: transactions.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: protocol.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: process.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: init.capnp.proxy-client.c++:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: init.capnp.proxy-types.c++:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: mining.capnp.proxy-types.c++:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: init.capnp.proxy-server.c++:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: mining.capnp.proxy-client.c++:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: mining.capnp.proxy-server.c++:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: core_io.cpp:GetTransactionInputWeight(CTxIn const&)
policy.cpp:GetTransactionInputWeight(CTxIn const&)
Line
Count
Source
148
2
{
149
    // scriptWitness size is added here because witnesses and txins are split up in segwit serialization.
150
2
    return ::GetSerializeSize(TX_NO_WITNESS(txin)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(txin)) + ::GetSerializeSize(txin.scriptWitness.stack);
151
2
}
Unexecuted instantiation: rawtransaction_util.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: descriptor.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: miniscript.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: sign.cpp:GetTransactionInputWeight(CTxIn const&)
Unexecuted instantiation: bitcoind.cpp:GetTransactionInputWeight(CTxIn const&)
152
153
/** Compute at which vout of the block's coinbase transaction the witness commitment occurs, or -1 if not found */
154
inline int GetWitnessCommitmentIndex(const CBlock& block)
155
278k
{
156
278k
    int commitpos = NO_WITNESS_COMMITMENT;
157
278k
    if (!block.vtx.empty()) {
158
768k
        for (size_t o = 0; o < block.vtx[0]->vout.size(); o++) {
159
490k
            const CTxOut& vout = block.vtx[0]->vout[o];
160
490k
            if (vout.scriptPubKey.size() >= MINIMUM_WITNESS_COMMITMENT &&
161
490k
                vout.scriptPubKey[0] == OP_RETURN &&
162
490k
                vout.scriptPubKey[1] == 0x24 &&
163
490k
                vout.scriptPubKey[2] == 0xaa &&
164
490k
                vout.scriptPubKey[3] == 0x21 &&
165
490k
                vout.scriptPubKey[4] == 0xa9 &&
166
490k
                vout.scriptPubKey[5] == 0xed) {
167
201k
                commitpos = o;
168
201k
            }
169
490k
        }
170
278k
    }
171
278k
    return commitpos;
172
278k
}
173
174
#endif // BITCOIN_CONSENSUS_VALIDATION_H