@@ -19,59 +19,6 @@ static constexpr CAmount MIN_CHANGE{COIN / 100};
19
19
static const CAmount MIN_FINAL_CHANGE = MIN_CHANGE/2 ;
20
20
21
21
/* * A UTXO under consideration for use in funding a new transaction. */
22
- class CInputCoin {
23
- public:
24
- CInputCoin (const CTransactionRef& tx, unsigned int i)
25
- {
26
- if (!tx)
27
- throw std::invalid_argument (" tx should not be null" );
28
- if (i >= tx->vout .size ())
29
- throw std::out_of_range (" The output index is out of range" );
30
-
31
- outpoint = COutPoint (tx->GetHash (), i);
32
- txout = tx->vout [i];
33
- effective_value = txout.nValue ;
34
- }
35
-
36
- CInputCoin (const CTransactionRef& tx, unsigned int i, int input_bytes) : CInputCoin(tx, i)
37
- {
38
- m_input_bytes = input_bytes;
39
- }
40
-
41
- CInputCoin (const COutPoint& outpoint_in, const CTxOut& txout_in)
42
- {
43
- outpoint = outpoint_in;
44
- txout = txout_in;
45
- effective_value = txout.nValue ;
46
- }
47
-
48
- CInputCoin (const COutPoint& outpoint_in, const CTxOut& txout_in, int input_bytes) : CInputCoin(outpoint_in, txout_in)
49
- {
50
- m_input_bytes = input_bytes;
51
- }
52
-
53
- COutPoint outpoint;
54
- CTxOut txout;
55
- CAmount effective_value;
56
- CAmount m_fee{0 };
57
- CAmount m_long_term_fee{0 };
58
-
59
- /* * Pre-computed estimated size of this output as a fully-signed input in a transaction. Can be -1 if it could not be calculated */
60
- int m_input_bytes{-1 };
61
-
62
- bool operator <(const CInputCoin& rhs) const {
63
- return outpoint < rhs.outpoint ;
64
- }
65
-
66
- bool operator !=(const CInputCoin& rhs) const {
67
- return outpoint != rhs.outpoint ;
68
- }
69
-
70
- bool operator ==(const CInputCoin& rhs) const {
71
- return outpoint == rhs.outpoint ;
72
- }
73
- };
74
-
75
22
class COutput
76
23
{
77
24
public:
@@ -134,11 +81,6 @@ class COutput
134
81
135
82
std::string ToString () const ;
136
83
137
- inline CInputCoin GetInputCoin () const
138
- {
139
- return CInputCoin (outpoint, txout, input_bytes);
140
- }
141
-
142
84
bool operator <(const COutput& rhs) const {
143
85
return outpoint < rhs.outpoint ;
144
86
}
0 commit comments