Skip to content

Commit 7d63776

Browse files
committed
refactor: follow-up for bitcoin#27902 and bitcoin#23201 to remove segwit related code
1 parent 88231b1 commit 7d63776

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

src/wallet/coincontrol.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -129,23 +129,6 @@ class CCoinControl
129129
vOutpoints.assign(setSelected.begin(), setSelected.end());
130130
}
131131

132-
void SetInputWeight(const COutPoint& outpoint, int64_t weight)
133-
{
134-
m_input_weights[outpoint] = weight;
135-
}
136-
137-
bool HasInputWeight(const COutPoint& outpoint) const
138-
{
139-
return m_input_weights.count(outpoint) > 0;
140-
}
141-
142-
int64_t GetInputWeight(const COutPoint& outpoint) const
143-
{
144-
auto it = m_input_weights.find(outpoint);
145-
assert(it != m_input_weights.end());
146-
return it->second;
147-
}
148-
149132
// Dash-specific helpers
150133
void UseCoinJoin(bool fUseCoinJoin)
151134
{
@@ -160,8 +143,6 @@ class CCoinControl
160143
private:
161144
std::set<COutPoint> setSelected;
162145
std::map<COutPoint, CTxOut> m_external_txouts;
163-
//! Map of COutPoints to the maximum weight for that input
164-
std::map<COutPoint, int64_t> m_input_weights;
165146
};
166147
} // namespace wallet
167148

src/wallet/test/fuzz/coincontrol.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,6 @@ FUZZ_TARGET(coincontrol, .init = initialize_coincontrol)
7272
[&] {
7373
std::vector<COutPoint> selected;
7474
coin_control.ListSelected(selected);
75-
},
76-
[&] {
77-
int64_t weight{fuzzed_data_provider.ConsumeIntegral<int64_t>()};
78-
(void)coin_control.SetInputWeight(out_point, weight);
79-
},
80-
[&] {
81-
// Condition to avoid the assertion in GetInputWeight
82-
if (coin_control.HasInputWeight(out_point)) {
83-
(void)coin_control.GetInputWeight(out_point);
84-
}
8575
});
8676
}
8777
}

0 commit comments

Comments
 (0)