Difference between long-term-fee-rate and discard fee-rate
In the bitcoin-core codebase, it seems that discard fee-rate and long-term fee-rate are used interchangeably when computing the cost of change. Consider the following code excerpts:
cost_of_change = discard_feerate.GetFee(change_spend_size) + effective_feerate.GetFee(change_output_size);
and also:
cost_of_change = effective_feerate.GetFee(change_output_size) + long_term_feerate.GetFee(change_spend_size);
In both of these snippets, the cost_of_change is being computed, however, one uses the long-term fee-rate while the other uses the discard fee-rate. Are these two terms actually distinct or can they be used interchangeably?
To my knowledge, cost_of_change should be calculated using the discard fee_rate, and the long_term fee_rate is useful as a parameter within the selection algorithm for knowing if the current fee-rate is cheap or expensive. And yet, I see these two code pieces which seem to conflate the two.
from Recent Questions - Bitcoin Stack Exchange https://ift.tt/HYL9bVf
via IFTTT