<p>It is used to report back to callers into the fee estimation functions to learn why the returned feerate was chosen. Descriptions for these reasons are:</p>
<pre><code>static const std::map&lt;FeeReason, std::string&gt; fee_reason_strings = {
    {FeeReason::NONE, &quot;None&quot;},
    {FeeReason::HALF_ESTIMATE, &quot;Half Target 60% Threshold&quot;},
    {FeeReason::FULL_ESTIMATE, &quot;Target 85% Threshold&quot;},
    {FeeReason::DOUBLE_ESTIMATE, &quot;Double Target 95% Threshold&quot;},
    {FeeReason::CONSERVATIVE, &quot;Conservative Double Target longer horizon&quot;},
    {FeeReason::MEMPOOL_MIN, &quot;Mempool Min Fee&quot;},
    {FeeReason::PAYTXFEE, &quot;PayTxFee set&quot;},
    {FeeReason::FALLBACK, &quot;Fallback fee&quot;},
    {FeeReason::REQUIRED, &quot;Minimum Required Fee&quot;},
};
</code></pre>

CC BY-SA 4.0
2022-07-15T14:26:23.660Z
Is there any document or resource to learn more about these reasons? What does each of them mean?
Amir reza Riahi
CC BY-SA 4.0
2022-07-14T21:22:07.453Z
2022-07-14T21:22:07.453Z
Ava Chow
<p><a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/fees.h#L44" rel="nofollow noreferrer">There</a> is enumeration called <code>FeeReason</code>. What is it? What is its use cases?</p>
<pre><code>/* Enumeration of reason for returned fee estimate */
enum class FeeReason {
    NONE,
    HALF_ESTIMATE,
    FULL_ESTIMATE,
    DOUBLE_ESTIMATE,
    CONSERVATIVE,
    MEMPOOL_MIN,
    PAYTXFEE,
    FALLBACK,
    REQUIRED,
};
</code></pre>

<transaction-fees><bitcoin-core-development><source-code>
What is the FeeReason enumeration in the Bitcoin Core?
Amir reza Riahi
# What is the FeeReason enumeration in the Bitcoin Core?

(Asked by: username_0 on 2022-07-14)

[There](https://github.com/bitcoin/bitcoin/blob/master/src/policy/fees.h#L44) is enumeration called `FeeReason`. What is it? What is its use cases?

```
/* Enumeration of reason for returned fee estimate */
enum class FeeReason {
    NONE,
    HALF_ESTIMATE,
    FULL_ESTIMATE,
    DOUBLE_ESTIMATE,
    CONSERVATIVE,
    MEMPOOL_MIN,
    PAYTXFEE,
    FALLBACK,
    REQUIRED,
};

```

**Tags:** transaction-fees, bitcoin-core-development, source-code


---

## 1 answers

### Answer by username_1 on 2022-07-14. Score: 1

It is used to report back to callers into the fee estimation functions to learn why the returned feerate was chosen. Descriptions for these reasons are:

```
static const std::map<FeeReason, std::string> fee_reason_strings = {
    {FeeReason::NONE, "None"},
    {FeeReason::HALF_ESTIMATE, "Half Target 60% Threshold"},
    {FeeReason::FULL_ESTIMATE, "Target 85% Threshold"},
    {FeeReason::DOUBLE_ESTIMATE, "Double Target 95% Threshold"},
    {FeeReason::CONSERVATIVE, "Conservative Double Target longer horizon"},
    {FeeReason::MEMPOOL_MIN, "Mempool Min Fee"},
    {FeeReason::PAYTXFEE, "PayTxFee set"},
    {FeeReason::FALLBACK, "Fallback fee"},
    {FeeReason::REQUIRED, "Minimum Required Fee"},
};

```

> **Comments:**
> **username_0**: Is there any document or resource to learn more about these reasons? What does each of them mean?  

---

