diff options
| author | Jon Atack <[email protected]> | 2020-11-10 12:29:01 +0100 |
|---|---|---|
| committer | Jon Atack <[email protected]> | 2020-11-12 11:43:17 +0100 |
| commit | 449b730579566459e350703611629e63e54657ed (patch) | |
| tree | 0cd98fd3d8cb44d52df4221677fa387e9ecc2dd7 /src/util | |
| parent | wallet: update remaining rpcwallet fee rate units to BTC/kvB (diff) | |
| download | discoin-449b730579566459e350703611629e63e54657ed.tar.xz discoin-449b730579566459e350703611629e63e54657ed.zip | |
wallet: provide valid values if invalid estimate mode passed
Co-authored-by: Murch <[email protected]>
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/fees.cpp | 5 | ||||
| -rw-r--r-- | src/util/fees.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/util/fees.cpp b/src/util/fees.cpp index 9a1cea1d4..1855c0bc9 100644 --- a/src/util/fees.cpp +++ b/src/util/fees.cpp @@ -49,6 +49,11 @@ std::string FeeModes(const std::string& delimiter) return Join(FeeModeMap(), delimiter, [&](const std::pair<std::string, FeeEstimateMode>& i) { return i.first; }); } +const std::string InvalidEstimateModeErrorMessage() +{ + return "Invalid estimate_mode parameter, must be one of: \"" + FeeModes("\", \"") + "\""; +} + bool FeeModeFromString(const std::string& mode_string, FeeEstimateMode& fee_estimate_mode) { auto searchkey = ToUpper(mode_string); diff --git a/src/util/fees.h b/src/util/fees.h index d52046a44..3f1c33ad9 100644 --- a/src/util/fees.h +++ b/src/util/fees.h @@ -13,5 +13,6 @@ enum class FeeReason; bool FeeModeFromString(const std::string& mode_string, FeeEstimateMode& fee_estimate_mode); std::string StringForFeeReason(FeeReason reason); std::string FeeModes(const std::string& delimiter); +const std::string InvalidEstimateModeErrorMessage(); #endif // BITCOIN_UTIL_FEES_H |