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

Function GetTxnOutputType

src/script/solver.cpp:18–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16typedef std::vector<unsigned char> valtype;
17
18std::string GetTxnOutputType(TxoutType t)
19{
20 switch (t) {
21 case TxoutType::NONSTANDARD: return "nonstandard";
22 case TxoutType::PUBKEY: return "pubkey";
23 case TxoutType::PUBKEYHASH: return "pubkeyhash";
24 case TxoutType::SCRIPTHASH: return "scripthash";
25 case TxoutType::MULTISIG: return "multisig";
26 case TxoutType::NULL_DATA: return "nulldata";
27 case TxoutType::ANCHOR: return "anchor";
28 case TxoutType::WITNESS_V0_KEYHASH: return "witness_v0_keyhash";
29 case TxoutType::WITNESS_V0_SCRIPTHASH: return "witness_v0_scripthash";
30 case TxoutType::WITNESS_V1_TAPROOT: return "witness_v1_taproot";
31 case TxoutType::WITNESS_UNKNOWN: return "witness_unknown";
32 } // no default case, so the compiler can warn about missing cases
33 assert(false);
34}
35
36static bool MatchPayToPubkey(const CScript& script, valtype& pubkey)
37{

Callers 3

ScriptToUnivFunction · 0.85
ProcessSubScriptMethod · 0.85
GetAllOutputTypesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected