| 108 | } |
| 109 | |
| 110 | std::optional<OutputType> OutputTypeFromDestination(const CTxDestination& dest) { |
| 111 | if (std::holds_alternative<PKHash>(dest) || |
| 112 | std::holds_alternative<ScriptHash>(dest)) { |
| 113 | return OutputType::LEGACY; |
| 114 | } |
| 115 | if (std::holds_alternative<WitnessV0KeyHash>(dest) || |
| 116 | std::holds_alternative<WitnessV0ScriptHash>(dest)) { |
| 117 | return OutputType::BECH32; |
| 118 | } |
| 119 | if (std::holds_alternative<WitnessV1Taproot>(dest) || |
| 120 | std::holds_alternative<WitnessUnknown>(dest)) { |
| 121 | return OutputType::BECH32M; |
| 122 | } |
| 123 | return std::nullopt; |
| 124 | } |
no outgoing calls
no test coverage detected