1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// Copyright (c) 2017-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
class CBlockIndex;
class CCoinsViewCache;
class CTransaction;
class TxValidationState;
/** Transaction validation functions */
namespace Consensus // namespace Consensus
/** Auxiliary functions for transaction validation (ideally should not be exposed) */
/**
* Count ECDSA signature operations the old-fashioned (pre-0.6) way
* @return number of sigops this transaction's outputs will produce when spent
* @see CTransaction::FetchInputs
*/
unsigned int ;
/**
* Count ECDSA signature operations in pay-to-script-hash inputs.
*
* @param[in] mapInputs Map of previous transactions that have outputs we're spending
* @return maximum number of sigops required to validate this transaction's inputs
* @see CTransaction::FetchInputs
*/
unsigned int ;
/**
* Compute total signature operation cost of a transaction.
* @param[in] tx Transaction for which we are computing the cost
* @param[in] inputs Map of previous transactions that have outputs we're spending
* @param[in] flags Script verification flags
* @return Total signature operation cost of tx
*/
int64_t ;
/**
* Check if transaction is final and can be included in a block with the
* specified height and time. Consensus critical.
*/
bool ;
/**
* Calculates the block height and previous block's median time past at
* which the transaction will be considered final in the context of BIP 68.
* For each input that is not sequence locked, the corresponding entries in
* prevHeights are set to 0 as they do not affect the calculation.
*/
std::pair<int, int64_t> ;
bool ;
/**
* Check if transaction is final per BIP 68 sequence numbers and can be included in a block.
* Consensus critical. Takes as input a list of heights at which tx's inputs (in order) confirmed.
*/
bool ;
// BITCOIN_CONSENSUS_TX_VERIFY_H