0

There 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,
};

1 Answer 1

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"},
};
1
  • Is there any document or resource to learn more about these reasons? What does each of them mean? Commented Jul 15, 2022 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.