elements: Fix build by removing newly-added assertion from upstream that doesn't make sense with assets

This commit is contained in:
Glenn Willen 2022-07-27 08:36:39 -07:00
parent a4b194c671
commit ca2d72ae8b

View file

@ -1385,10 +1385,6 @@ bool CWallet::CreateTransactionInternal(
fee_needed = coin_selection_params.m_effective_feerate.GetFee(nBytes);
}
// The only time that fee_needed should be less than the amount available for fees (in change_and_fee - change_amount) is when
// we are subtracting the fee from the outputs. If this occurs at any other time, it is a bug.
assert(coin_selection_params.m_subtract_fee_outputs || fee_needed <= change_and_fee - change_amount);
// Update nFeeRet in case fee_needed changed due to dropping the change output
if (fee_needed <= map_change_and_fee.at(policyAsset) - change_amount) {
nFeeRet = map_change_and_fee.at(policyAsset) - change_amount;