MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / StringForFeeEstimateHorizon

Function StringForFeeEstimateHorizon

src/policy/fees.cpp:17–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15static constexpr double INF_FEERATE = 1e99;
16
17std::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
30std::string StringForFeeReason(FeeReason reason) {
31 static const std::map<FeeReason, std::string> fee_reason_strings = {

Callers 1

estimaterawfeeFunction · 0.85

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected