| 16 | typedef std::vector<unsigned char> valtype; |
| 17 | |
| 18 | std::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 | |
| 36 | static bool MatchPayToPubkey(const CScript& script, valtype& pubkey) |
| 37 | { |
no outgoing calls
no test coverage detected