[wallet] assert BnB internally calculated waste is the same as GetSelectionWaste()
These two implementations of waste calculation should never deviate. Still keep the SelectCoinsBnB internal calculation because incremental calculate-as-you-go is much more performant than calling GetSelectionWaste() over and over again.
This commit is contained in:
1 parent
ce1fabe545
commit
ec7d73628a
2 files changed
+2
-1
No files matched your search
@@ -163,6 +163,8 @@ std::optional<SelectionResult> SelectCoinsBnB(std::vector<OutputGroup>& utxo_poo
|
||||
result.AddInput(utxo_pool.at(i));
|
||||
}
|
||||
}
|
||||
result.ComputeAndSetWaste(CAmount{0});
|
||||
assert(best_waste == result.GetWaste());
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user