/root/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 <string> |
10 | | #include <consensus/consensus.h> |
11 | | #include <primitives/transaction.h> |
12 | | #include <primitives/block.h> |
13 | | |
14 | | /** Index marker for when no witness commitment is present in a coinbase transaction. */ |
15 | | static constexpr int NO_WITNESS_COMMITMENT{-1}; |
16 | | |
17 | | /** Minimum size of a witness commitment structure. Defined in BIP 141. **/ |
18 | | static constexpr size_t MINIMUM_WITNESS_COMMITMENT{38}; |
19 | | |
20 | | /** A "reason" why a transaction was invalid, suitable for determining whether the |
21 | | * provider of the transaction should be banned/ignored/disconnected/etc. |
22 | | */ |
23 | | enum class TxValidationResult { |
24 | | TX_RESULT_UNSET = 0, //!< initial value. Tx has not yet been rejected |
25 | | TX_CONSENSUS, //!< invalid by consensus rules |
26 | | TX_INPUTS_NOT_STANDARD, //!< inputs (covered by txid) failed policy rules |
27 | | TX_NOT_STANDARD, //!< otherwise didn't meet our local policy rules |
28 | | TX_MISSING_INPUTS, //!< transaction was missing some of its inputs |
29 | | TX_PREMATURE_SPEND, //!< transaction spends a coinbase too early, or violates locktime/sequence locks |
30 | | /** |
31 | | * Transaction might have a witness prior to SegWit |
32 | | * activation, or witness may have been malleated (which includes |
33 | | * non-standard witnesses). |
34 | | */ |
35 | | TX_WITNESS_MUTATED, |
36 | | /** |
37 | | * Transaction is missing a witness. |
38 | | */ |
39 | | TX_WITNESS_STRIPPED, |
40 | | /** |
41 | | * Tx already in mempool or conflicts with a tx in the chain |
42 | | * (if it conflicts with another tx in mempool, we use MEMPOOL_POLICY as it failed to reach the RBF threshold) |
43 | | * Currently this is only used if the transaction already exists in the mempool or on chain. |
44 | | */ |
45 | | TX_CONFLICT, |
46 | | TX_MEMPOOL_POLICY, //!< violated mempool's fee/size/descendant/RBF/etc limits |
47 | | TX_NO_MEMPOOL, //!< this node does not have a mempool so can't validate the transaction |
48 | | TX_RECONSIDERABLE, //!< fails some policy, but might be acceptable if submitted in a (different) package |
49 | | TX_UNKNOWN, //!< transaction was not validated because package failed |
50 | | }; |
51 | | |
52 | | /** A "reason" why a block was invalid, suitable for determining whether the |
53 | | * provider of the block should be banned/ignored/disconnected/etc. |
54 | | * These are much more granular than the rejection codes, which may be more |
55 | | * useful for some other use-cases. |
56 | | */ |
57 | | enum class BlockValidationResult { |
58 | | BLOCK_RESULT_UNSET = 0, //!< initial value. Block has not yet been rejected |
59 | | BLOCK_CONSENSUS, //!< invalid by consensus rules (excluding any below reasons) |
60 | | BLOCK_CACHED_INVALID, //!< this block was cached as being invalid and we didn't store the reason why |
61 | | BLOCK_INVALID_HEADER, //!< invalid proof of work or time too old |
62 | | BLOCK_MUTATED, //!< the block's data didn't match the data committed to by the PoW |
63 | | BLOCK_MISSING_PREV, //!< We don't have the previous block the checked one is built on |
64 | | BLOCK_INVALID_PREV, //!< A block this one builds on is invalid |
65 | | BLOCK_TIME_FUTURE, //!< block timestamp was > 2 hours in the future (or our clock is bad) |
66 | | BLOCK_HEADER_LOW_WORK //!< the block header may be on a too-little-work chain |
67 | | }; |
68 | | |
69 | | |
70 | | |
71 | | /** Template for capturing information about block/transaction validation. This is instantiated |
72 | | * by TxValidationState and BlockValidationState for validation information on transactions |
73 | | * and blocks respectively. */ |
74 | | template <typename Result> |
75 | | class ValidationState |
76 | | { |
77 | | private: |
78 | | enum class ModeState { |
79 | | M_VALID, //!< everything ok |
80 | | M_INVALID, //!< network rule violation (DoS value may be set) |
81 | | M_ERROR, //!< run-time error |
82 | | } m_mode{ModeState::M_VALID}; |
83 | | Result m_result{}; |
84 | | std::string m_reject_reason; |
85 | | std::string m_debug_message; |
86 | | |
87 | | public: |
88 | | bool Invalid(Result result, |
89 | | const std::string& reject_reason = "", |
90 | | const std::string& debug_message = "") |
91 | 9.96M | { |
92 | 9.96M | m_result = result; |
93 | 9.96M | m_reject_reason = reject_reason; |
94 | 9.96M | m_debug_message = debug_message; |
95 | 9.96M | if (m_mode != ModeState::M_ERROR) m_mode = ModeState::M_INVALID; |
96 | 9.96M | return false; |
97 | 9.96M | } 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 | 91 | 4.99M | { | 92 | 4.99M | m_result = result; | 93 | 4.99M | m_reject_reason = reject_reason; | 94 | 4.99M | m_debug_message = debug_message; | 95 | 4.99M | if (m_mode != ModeState::M_ERROR) m_mode = ModeState::M_INVALID; | 96 | 4.99M | return false; | 97 | 4.99M | } |
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 | 91 | 4.58M | { | 92 | 4.58M | m_result = result; | 93 | 4.58M | m_reject_reason = reject_reason; | 94 | 4.58M | m_debug_message = debug_message; | 95 | 4.58M | if (m_mode != ModeState::M_ERROR) m_mode = ModeState::M_INVALID; | 96 | 4.58M | return false; | 97 | 4.58M | } |
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 | 91 | 390k | { | 92 | 390k | m_result = result; | 93 | 390k | m_reject_reason = reject_reason; | 94 | 390k | m_debug_message = debug_message; | 95 | 390k | if (m_mode != ModeState::M_ERROR) m_mode = ModeState::M_INVALID; | 96 | 390k | return false; | 97 | 390k | } |
|
98 | | bool Error(const std::string& reject_reason) |
99 | 0 | { |
100 | 0 | if (m_mode == ModeState::M_VALID) |
101 | 0 | m_reject_reason = reject_reason; |
102 | 0 | m_mode = ModeState::M_ERROR; |
103 | 0 | return false; |
104 | 0 | } |
105 | 211M | bool IsValid() const { return m_mode == ModeState::M_VALID; }ValidationState<TxValidationResult>::IsValid() const Line | Count | Source | 105 | 3.37M | bool IsValid() const { return m_mode == ModeState::M_VALID; } |
ValidationState<BlockValidationResult>::IsValid() const Line | Count | Source | 105 | 208M | bool IsValid() const { return m_mode == ModeState::M_VALID; } |
Unexecuted instantiation: ValidationState<PackageValidationResult>::IsValid() const |
106 | 14.1M | bool IsInvalid() const { return m_mode == ModeState::M_INVALID; }ValidationState<BlockValidationResult>::IsInvalid() const Line | Count | Source | 106 | 5.46M | bool IsInvalid() const { return m_mode == ModeState::M_INVALID; } |
ValidationState<TxValidationResult>::IsInvalid() const Line | Count | Source | 106 | 8.43M | bool IsInvalid() const { return m_mode == ModeState::M_INVALID; } |
ValidationState<PackageValidationResult>::IsInvalid() const Line | Count | Source | 106 | 272k | bool IsInvalid() const { return m_mode == ModeState::M_INVALID; } |
|
107 | 0 | bool IsError() const { return m_mode == ModeState::M_ERROR; } |
108 | 28.4M | Result GetResult() const { return m_result; }Unexecuted instantiation: ValidationState<PackageValidationResult>::GetResult() const ValidationState<TxValidationResult>::GetResult() const Line | Count | Source | 108 | 22.8M | Result GetResult() const { return m_result; } |
ValidationState<BlockValidationResult>::GetResult() const Line | Count | Source | 108 | 5.59M | Result GetResult() const { return m_result; } |
|
109 | 18.1k | std::string GetRejectReason() const { return m_reject_reason; }Unexecuted instantiation: ValidationState<BlockValidationResult>::GetRejectReason[abi:cxx11]() const ValidationState<TxValidationResult>::GetRejectReason[abi:cxx11]() const Line | Count | Source | 109 | 18.1k | std::string GetRejectReason() const { return m_reject_reason; } |
Unexecuted instantiation: ValidationState<PackageValidationResult>::GetRejectReason[abi:cxx11]() const |
110 | 43.5k | std::string GetDebugMessage() const { return m_debug_message; }ValidationState<BlockValidationResult>::GetDebugMessage[abi:cxx11]() const Line | Count | Source | 110 | 25.4k | std::string GetDebugMessage() const { return m_debug_message; } |
ValidationState<TxValidationResult>::GetDebugMessage[abi:cxx11]() const Line | Count | Source | 110 | 18.1k | std::string GetDebugMessage() const { return m_debug_message; } |
|
111 | | std::string ToString() const |
112 | 42.2k | { |
113 | 42.2k | if (IsValid()) { |
114 | 0 | return "Valid"; |
115 | 0 | } |
116 | | |
117 | 42.2k | if (!m_debug_message.empty()) { |
118 | 42.2k | return m_reject_reason + ", " + m_debug_message; |
119 | 42.2k | } |
120 | | |
121 | 0 | return m_reject_reason; |
122 | 42.2k | } ValidationState<BlockValidationResult>::ToString[abi:cxx11]() const Line | Count | Source | 112 | 42.2k | { | 113 | 42.2k | if (IsValid()) { | 114 | 0 | return "Valid"; | 115 | 0 | } | 116 | | | 117 | 42.2k | if (!m_debug_message.empty()) { | 118 | 42.2k | return m_reject_reason + ", " + m_debug_message; | 119 | 42.2k | } | 120 | | | 121 | 0 | return m_reject_reason; | 122 | 42.2k | } |
Unexecuted instantiation: ValidationState<PackageValidationResult>::ToString[abi:cxx11]() const Unexecuted instantiation: ValidationState<TxValidationResult>::ToString[abi:cxx11]() const |
123 | | }; |
124 | | |
125 | | class TxValidationState : public ValidationState<TxValidationResult> {}; |
126 | | class BlockValidationState : public ValidationState<BlockValidationResult> {}; |
127 | | |
128 | | // These implement the weight = (stripped_size * 4) + witness_size formula, |
129 | | // using only serialization with and without witness data. As witness_size |
130 | | // is equal to total_size - stripped_size, this formula is identical to: |
131 | | // weight = (stripped_size * 3) + total_size. |
132 | | static inline int32_t GetTransactionWeight(const CTransaction& tx) |
133 | 22.1M | { |
134 | 22.1M | return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx)); |
135 | 22.1M | } Unexecuted instantiation: addition_overflow.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: addrman.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: autofile.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: banman.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: base_encode_decode.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: bip324.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: bitdeque.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: bitset.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: block.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: block_header.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: block_index.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: block_index_tree.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: blockfilter.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: bloom_filter.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: buffered_file.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: chain.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: checkqueue.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: cmpctblock.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: coins_view.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: coinscache_sim.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: connman.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: crypto.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: crypto_aes256.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: crypto_aes256cbc.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: crypto_chacha20.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: crypto_chacha20poly1305.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: crypto_common.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: crypto_diff_fuzz_chacha20.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: crypto_hkdf_hmac_sha256_l32.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: crypto_poly1305.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: cuckoocache.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: deserialize.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: feefrac.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: fee_rate.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: feeratediagram.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: fees.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: flatfile.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: float.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: golomb_rice.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: headerssync.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: hex.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: http_request.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: i2p.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: integer.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: key.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: kitchen_sink.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: load_external_block_file.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: merkle.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: merkleblock.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: message.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: miniscript.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: minisketch.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: mini_miner.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: muhash.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: multiplication_overflow.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: net.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: net_permissions.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: netaddress.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: netbase_dns_lookup.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: node_eviction.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: p2p_handshake.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: p2p_headers_presync.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: p2p_transport_serialization.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: pcp.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: package_eval.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: parse_hd_keypath.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: parse_univalue.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: partially_downloaded_block.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: policy_estimator.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: policy_estimator_io.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: poolresource.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: pow.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: primitives_transaction.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: process_message.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: process_messages.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: protocol.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: psbt.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: random.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: rbf.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: rolling_bloom_filter.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: rpc.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: script.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: script_descriptor_cache.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: script_format.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: script_interpreter.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: script_ops.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: script_sigcache.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: script_sign.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: scriptnum_ops.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: secp256k1_ec_seckey_import_export_der.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: secp256k1_ecdsa_signature_parse_der_lax.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: signature_checker.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: signet.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: socks5.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: span.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: string.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: strprintf.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: system.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: torcontrol.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: transaction.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: txdownloadman.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: tx_in.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: tx_out.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: tx_pool.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: txorphan.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: utxo_snapshot.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: utxo_total_supply.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: validation_load_mempool.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: vecdeque.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: versionbits.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: coincontrol.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: coinselection.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: crypter.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: scriptpubkeyman.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: spend.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: wallet_bdb_parser.cpp:GetTransactionWeight(CTransaction const&) mempool.cpp:GetTransactionWeight(CTransaction const&) Line | Count | Source | 133 | 3.17M | { | 134 | 3.17M | return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx)); | 135 | 3.17M | } |
Unexecuted instantiation: threadinterrupt.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: util.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: messages.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: core_io.cpp:GetTransactionWeight(CTransaction const&) policy.cpp:GetTransactionWeight(CTransaction const&) Line | Count | Source | 133 | 5.83M | { | 134 | 5.83M | return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx)); | 135 | 5.83M | } |
Unexecuted instantiation: descriptor.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: sign.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: dump.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: wallet.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: walletdb.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: external_signer_scriptpubkeyman.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: interfaces.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: load.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: receive.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: feebumper.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: addresses.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: backup.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: coins.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: encrypt.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: signmessage.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: transactions.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: mining.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: setup_common.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: transaction_utils.cpp:GetTransactionWeight(CTransaction const&) txmempool.cpp:GetTransactionWeight(CTransaction const&) Line | Count | Source | 133 | 3.17M | { | 134 | 3.17M | return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx)); | 135 | 3.17M | } |
Unexecuted instantiation: validation.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: blockencodings.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: tx_verify.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: caches.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: 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: peerman_args.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: txdownloadman_impl.cpp:GetTransactionWeight(CTransaction const&) txorphanage.cpp:GetTransactionWeight(CTransaction const&) Line | Count | Source | 133 | 9.41M | { | 134 | 9.41M | return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx)); | 135 | 9.41M | } |
Unexecuted instantiation: block_policy_estimator.cpp:GetTransactionWeight(CTransaction const&) packages.cpp:GetTransactionWeight(CTransaction const&) Line | Count | Source | 133 | 530k | { | 134 | 530k | return ::GetSerializeSize(TX_NO_WITNESS(tx)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(tx)); | 135 | 530k | } |
Unexecuted instantiation: settings.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: rest.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: blockchain.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: node.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: output_script.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: validationinterface.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: httprpc.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: base.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: blockfilterindex.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: coin.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: ephemeral_policy.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: truc_policy.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: external_signer.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: rawtransaction_util.cpp:GetTransactionWeight(CTransaction const&) Unexecuted instantiation: tx_check.cpp:GetTransactionWeight(CTransaction const&) |
136 | | static inline int64_t GetBlockWeight(const CBlock& block) |
137 | 89.0M | { |
138 | 89.0M | return ::GetSerializeSize(TX_NO_WITNESS(block)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(block)); |
139 | 89.0M | } Unexecuted instantiation: addition_overflow.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: addrman.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: autofile.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: banman.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: base_encode_decode.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: bip324.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: bitdeque.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: bitset.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: block.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: block_header.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: block_index.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: block_index_tree.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: blockfilter.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: bloom_filter.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: buffered_file.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: chain.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: checkqueue.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: cmpctblock.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: coins_view.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: coinscache_sim.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: connman.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: crypto.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: crypto_aes256.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: crypto_aes256cbc.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: crypto_chacha20.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: crypto_chacha20poly1305.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: crypto_common.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: crypto_diff_fuzz_chacha20.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: crypto_hkdf_hmac_sha256_l32.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: crypto_poly1305.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: cuckoocache.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: deserialize.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: feefrac.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: fee_rate.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: feeratediagram.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: fees.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: flatfile.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: float.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: golomb_rice.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: headerssync.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: hex.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: http_request.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: i2p.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: integer.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: key.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: kitchen_sink.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: load_external_block_file.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: merkle.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: merkleblock.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: message.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: miniscript.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: minisketch.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: mini_miner.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: muhash.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: multiplication_overflow.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: net.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: net_permissions.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: netaddress.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: netbase_dns_lookup.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: node_eviction.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: p2p_handshake.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: p2p_headers_presync.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: p2p_transport_serialization.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: pcp.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: package_eval.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: parse_hd_keypath.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: parse_univalue.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: partially_downloaded_block.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: policy_estimator.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: policy_estimator_io.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: poolresource.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: pow.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: primitives_transaction.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: process_message.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: process_messages.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: protocol.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: psbt.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: random.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: rbf.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: rolling_bloom_filter.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: rpc.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: script.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: script_descriptor_cache.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: script_format.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: script_interpreter.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: script_ops.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: script_sigcache.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: script_sign.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: scriptnum_ops.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: secp256k1_ec_seckey_import_export_der.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: secp256k1_ecdsa_signature_parse_der_lax.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: signature_checker.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: signet.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: socks5.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: span.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: string.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: strprintf.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: system.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: torcontrol.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: transaction.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: txdownloadman.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: tx_in.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: tx_out.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: tx_pool.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: txorphan.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: utxo_snapshot.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: utxo_total_supply.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: validation_load_mempool.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: vecdeque.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: versionbits.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: coincontrol.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: coinselection.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: crypter.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: scriptpubkeyman.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: spend.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: wallet_bdb_parser.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: mempool.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: threadinterrupt.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: util.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: messages.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: core_io.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: policy.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: descriptor.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: sign.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: dump.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: wallet.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: walletdb.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: external_signer_scriptpubkeyman.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: interfaces.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: load.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: receive.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: feebumper.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: addresses.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: backup.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: coins.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: encrypt.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: signmessage.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: transactions.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: mining.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 | 137 | 59.5M | { | 138 | 59.5M | return ::GetSerializeSize(TX_NO_WITNESS(block)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(block)); | 139 | 59.5M | } |
Unexecuted instantiation: blockencodings.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: tx_verify.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: caches.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: 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 | 137 | 29.5M | { | 138 | 29.5M | return ::GetSerializeSize(TX_NO_WITNESS(block)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(block)); | 139 | 29.5M | } |
Unexecuted instantiation: peerman_args.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: txdownloadman_impl.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: txorphanage.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: block_policy_estimator.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: packages.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: settings.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: rest.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: blockchain.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: node.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: output_script.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: validationinterface.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: httprpc.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: base.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: blockfilterindex.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: coin.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: ephemeral_policy.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: truc_policy.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: external_signer.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: rawtransaction_util.cpp:GetBlockWeight(CBlock const&) Unexecuted instantiation: tx_check.cpp:GetBlockWeight(CBlock const&) |
140 | | static inline int64_t GetTransactionInputWeight(const CTxIn& txin) |
141 | 0 | { |
142 | | // scriptWitness size is added here because witnesses and txins are split up in segwit serialization. |
143 | 0 | return ::GetSerializeSize(TX_NO_WITNESS(txin)) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(TX_WITH_WITNESS(txin)) + ::GetSerializeSize(txin.scriptWitness.stack); |
144 | 0 | } Unexecuted instantiation: addition_overflow.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: addrman.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: autofile.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: banman.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: base_encode_decode.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: bip324.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: bitdeque.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: bitset.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: block.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: block_header.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: block_index.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: block_index_tree.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: blockfilter.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: bloom_filter.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: buffered_file.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: chain.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: checkqueue.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: cmpctblock.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: coins_view.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: coinscache_sim.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: connman.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: crypto.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: crypto_aes256.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: crypto_aes256cbc.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: crypto_chacha20.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: crypto_chacha20poly1305.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: crypto_common.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: crypto_diff_fuzz_chacha20.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: crypto_hkdf_hmac_sha256_l32.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: crypto_poly1305.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: cuckoocache.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: deserialize.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: feefrac.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: fee_rate.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: feeratediagram.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: fees.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: flatfile.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: float.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: golomb_rice.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: headerssync.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: hex.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: http_request.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: i2p.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: integer.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: key.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: kitchen_sink.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: load_external_block_file.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: merkle.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: merkleblock.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: message.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: miniscript.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: minisketch.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: mini_miner.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: muhash.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: multiplication_overflow.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: net.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: net_permissions.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: netaddress.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: netbase_dns_lookup.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: node_eviction.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: p2p_handshake.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: p2p_headers_presync.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: p2p_transport_serialization.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: pcp.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: package_eval.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: parse_hd_keypath.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: parse_univalue.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: partially_downloaded_block.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: policy_estimator.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: policy_estimator_io.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: poolresource.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: pow.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: primitives_transaction.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: process_message.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: process_messages.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: protocol.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: psbt.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: random.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: rbf.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: rolling_bloom_filter.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: rpc.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: script.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: script_descriptor_cache.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: script_format.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: script_interpreter.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: script_ops.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: script_sigcache.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: script_sign.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: scriptnum_ops.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: secp256k1_ec_seckey_import_export_der.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: secp256k1_ecdsa_signature_parse_der_lax.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: signature_checker.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: signet.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: socks5.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: span.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: string.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: strprintf.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: system.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: torcontrol.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: transaction.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: txdownloadman.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: tx_in.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: tx_out.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: tx_pool.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: txorphan.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: utxo_snapshot.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: utxo_total_supply.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: validation_load_mempool.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: vecdeque.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: versionbits.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: coincontrol.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: coinselection.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: crypter.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: scriptpubkeyman.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: spend.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: wallet_bdb_parser.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: mempool.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: threadinterrupt.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: util.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: messages.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: core_io.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: policy.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: descriptor.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: sign.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: dump.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: wallet.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: walletdb.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: external_signer_scriptpubkeyman.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: interfaces.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: load.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: receive.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: feebumper.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: addresses.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: backup.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: coins.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: encrypt.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: signmessage.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: transactions.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: mining.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: blockencodings.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: tx_verify.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: caches.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: 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: peerman_args.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: txdownloadman_impl.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: txorphanage.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: block_policy_estimator.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: packages.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: settings.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: rest.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: blockchain.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: node.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: output_script.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: validationinterface.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: httprpc.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: base.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: blockfilterindex.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: coin.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: ephemeral_policy.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: truc_policy.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: external_signer.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: rawtransaction_util.cpp:GetTransactionInputWeight(CTxIn const&) Unexecuted instantiation: tx_check.cpp:GetTransactionInputWeight(CTxIn const&) |
145 | | |
146 | | /** Compute at which vout of the block's coinbase transaction the witness commitment occurs, or -1 if not found */ |
147 | | inline int GetWitnessCommitmentIndex(const CBlock& block) |
148 | 133M | { |
149 | 133M | int commitpos = NO_WITNESS_COMMITMENT; |
150 | 133M | if (!block.vtx.empty()) { |
151 | 362M | for (size_t o = 0; o < block.vtx[0]->vout.size(); o++229M ) { |
152 | 229M | const CTxOut& vout = block.vtx[0]->vout[o]; |
153 | 229M | if (vout.scriptPubKey.size() >= MINIMUM_WITNESS_COMMITMENT && |
154 | 229M | vout.scriptPubKey[0] == OP_RETURN96.3M && |
155 | 229M | vout.scriptPubKey[1] == 0x2496.3M && |
156 | 229M | vout.scriptPubKey[2] == 0xaa96.3M && |
157 | 229M | vout.scriptPubKey[3] == 0x2196.3M && |
158 | 229M | vout.scriptPubKey[4] == 0xa996.3M && |
159 | 229M | vout.scriptPubKey[5] == 0xed96.3M ) { |
160 | 96.3M | commitpos = o; |
161 | 96.3M | } |
162 | 229M | } |
163 | 133M | } |
164 | 133M | return commitpos; |
165 | 133M | } |
166 | | |
167 | | #endif // BITCOIN_CONSENSUS_VALIDATION_H |