| 15 | static constexpr double INF_FEERATE = 1e99; |
| 16 | |
| 17 | std::string StringForFeeEstimateHorizon(FeeEstimateHorizon horizon) { |
| 18 | static const std::map<FeeEstimateHorizon, std::string> horizon_strings = { |
| 19 | {FeeEstimateHorizon::SHORT_HALFLIFE, "short"}, |
| 20 | {FeeEstimateHorizon::MED_HALFLIFE, "medium"}, |
| 21 | {FeeEstimateHorizon::LONG_HALFLIFE, "long"}, |
| 22 | }; |
| 23 | auto horizon_string = horizon_strings.find(horizon); |
| 24 | |
| 25 | if (horizon_string == horizon_strings.end()) return "unknown"; |
| 26 | |
| 27 | return horizon_string->second; |
| 28 | } |
| 29 | |
| 30 | std::string StringForFeeReason(FeeReason reason) { |
| 31 | static const std::map<FeeReason, std::string> fee_reason_strings = { |
no test coverage detected