refactor: add UNKNOWN OutputType

add to enum, array and handle UNKNOWN in various case statements
This commit is contained in:
josibake
2022-07-28 16:19:56 +02:00
parent ac59112a6a
commit f5649db9d5
4 changed files with 16 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ enum class OutputType {
P2SH_SEGWIT,
BECH32,
BECH32M,
UNKNOWN,
};
static constexpr auto OUTPUT_TYPES = std::array{
@@ -26,6 +27,7 @@ static constexpr auto OUTPUT_TYPES = std::array{
OutputType::P2SH_SEGWIT,
OutputType::BECH32,
OutputType::BECH32M,
OutputType::UNKNOWN,
};
std::optional<OutputType> ParseOutputType(const std::string& str);