File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -390,8 +390,7 @@ void SelectionResult::ComputeAndSetWaste(CAmount change_cost)
390
390
391
391
CAmount SelectionResult::GetWaste () const
392
392
{
393
- Assume (m_waste != std::nullopt);
394
- return *m_waste;
393
+ return *Assert (m_waste);
395
394
}
396
395
397
396
CAmount SelectionResult::GetSelectedValue () const
@@ -425,8 +424,8 @@ std::vector<CInputCoin> SelectionResult::GetShuffledInputVector() const
425
424
426
425
bool SelectionResult::operator <(SelectionResult other) const
427
426
{
428
- Assume (m_waste != std::nullopt );
429
- Assume (other.m_waste != std::nullopt );
427
+ Assert (m_waste. has_value () );
428
+ Assert (other.m_waste . has_value () );
430
429
// As this operator is only used in std::min_element, we want the result that has more inputs when waste are equal.
431
430
return *m_waste < *other.m_waste || (*m_waste == *other.m_waste && m_selected_inputs.size () > other.m_selected_inputs .size ());
432
431
}
You can’t perform that action at this time.
0 commit comments