MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / ParseOutputType

Function ParseOutputType

src/outputtype.cpp:23–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21static const std::string OUTPUT_TYPE_STRING_UNKNOWN = "unknown";
22
23std::optional<OutputType> ParseOutputType(std::string_view type)
24{
25 if (type == OUTPUT_TYPE_STRING_LEGACY) {
26 return OutputType::LEGACY;
27 } else if (type == OUTPUT_TYPE_STRING_P2SH_SEGWIT) {
28 return OutputType::P2SH_SEGWIT;
29 } else if (type == OUTPUT_TYPE_STRING_BECH32) {
30 return OutputType::BECH32;
31 } else if (type == OUTPUT_TYPE_STRING_BECH32M) {
32 return OutputType::BECH32M;
33 }
34 return std::nullopt;
35}
36
37const std::string& FormatOutputType(OutputType type)
38{

Callers 8

LoadWalletArgsMethod · 0.85
getnewaddressFunction · 0.85
getrawchangeaddressFunction · 0.85
FundTransactionFunction · 0.85
createwalletdescriptorFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGETFunction · 0.85
createmultisigFunction · 0.85

Calls

no outgoing calls

Tested by 2

FUZZ_TARGETFunction · 0.68
FUZZ_TARGETFunction · 0.68