19 static const std::map<FeeReason, std::string> fee_reason_strings = {
30 auto reason_string = fee_reason_strings.find(reason);
32 if (reason_string == fee_reason_strings.end())
return "Unknown";
34 return reason_string->second;
37 const std::vector<std::pair<std::string, FeeEstimateMode>>&
FeeModeMap()
39 static const std::vector<std::pair<std::string, FeeEstimateMode>> FEE_MODES = {
47 std::string
FeeModes(
const std::string& delimiter)
49 return Join(
FeeModeMap(), delimiter, [&](
const std::pair<std::string, FeeEstimateMode>& i) {
return i.first; });
54 return "Invalid estimate_mode parameter, must be one of: \"" +
FeeModes(
"\", \"") +
"\"";
59 auto searchkey =
ToUpper(mode_string);
61 if (
ToUpper(pair.first) == searchkey) {
62 fee_estimate_mode = pair.second;