<p><code>m_effective_value</code> is the value of the output minus the fees required to pay for spending it in an input. When using that, inputs are considered to be paying for themselves. However, if the subtract fee from output feature is being used, then this is no longer the case. The transaction's outputs will be paying the fees, so it is incorrect to consider the inputs as paying for themselves. As such, the real value, stored in <code>m_value</code>, needs to be used.</p>

CC BY-SA 4.0
2024-10-30T19:36:34.390Z
I see, thanks.  I didn't know about the subtract fee from output feature.  It sounds like it would be subtracted from the recipients output in this case.
yancy
CC BY-SA 4.0
2024-10-30T05:17:01.533Z
2024-10-30T05:17:01.533Z
Ava Chow
<p>During the process of coin_selection, the method <code>OutputGroup::GetSelectionAmount()</code> is called for each txout during selection.  This method either returns the m_value or the effective_value.  Why would the m_value be useful instead of the effective_value during coin-selection?</p>

<bitcoin-core-development><utxo><coin-selection><subtract-fee-from-output>
CoinSelection: GetSelectionAmount: m_value or effective_value
yancy
# CoinSelection: GetSelectionAmount: m_value or effective_value

(Asked by: username_0 on 2024-10-29)

During the process of coin\_selection, the method `OutputGroup::GetSelectionAmount()` is called for each txout during selection. This method either returns the m\_value or the effective\_value. Why would the m\_value be useful instead of the effective\_value during coin-selection?

**Tags:** bitcoin-core-development, utxo, coin-selection, subtract-fee-from-output


---

## 1 answers

### Answer by username_1 on 2024-10-30. Score: 2 | Accepted answer

`m_effective_value` is the value of the output minus the fees required to pay for spending it in an input. When using that, inputs are considered to be paying for themselves. However, if the subtract fee from output feature is being used, then this is no longer the case. The transaction's outputs will be paying the fees, so it is incorrect to consider the inputs as paying for themselves. As such, the real value, stored in `m_value`, needs to be used.

> **Comments:**
> **username_0**: I see, thanks.  I didn't know about the subtract fee from output feature.  It sounds like it would be subtracted from the recipients output in this case.  

---

