File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -115,9 +115,28 @@ class CCoinControl
115
115
vOutpoints.assign (setSelected.begin (), setSelected.end ());
116
116
}
117
117
118
+ void SetInputWeight (const COutPoint& outpoint, int64_t weight)
119
+ {
120
+ m_input_weights[outpoint] = weight;
121
+ }
122
+
123
+ bool HasInputWeight (const COutPoint& outpoint) const
124
+ {
125
+ return m_input_weights.count (outpoint) > 0 ;
126
+ }
127
+
128
+ int64_t GetInputWeight (const COutPoint& outpoint) const
129
+ {
130
+ auto it = m_input_weights.find (outpoint);
131
+ assert (it != m_input_weights.end ());
132
+ return it->second ;
133
+ }
134
+
118
135
private:
119
136
std::set<COutPoint> setSelected;
120
137
std::map<COutPoint, CTxOut> m_external_txouts;
138
+ // ! Map of COutPoints to the maximum weight for that input
139
+ std::map<COutPoint, int64_t > m_input_weights;
121
140
};
122
141
} // namespace wallet
123
142
You can’t perform that action at this time.
0 commit comments