| 59 | |
| 60 | |
| 61 | std::string GetTxnOutputType(TxoutType t) |
| 62 | { |
| 63 | switch (t) { |
| 64 | case TxoutType::NONSTANDARD: return "nonstandard"; |
| 65 | case TxoutType::PUBKEY: return "pubkey"; |
| 66 | case TxoutType::PUBKEYHASH: return "pubkeyhash"; |
| 67 | case TxoutType::SCRIPTHASH: return "scripthash"; |
| 68 | case TxoutType::MULTISIG: return "multisig"; |
| 69 | case TxoutType::NULL_DATA: return "nulldata"; |
| 70 | case TxoutType::WITNESS_V0_KEYHASH: return "witness_v0_keyhash"; |
| 71 | case TxoutType::WITNESS_V0_SCRIPTHASH: return "witness_v0_scripthash"; |
| 72 | case TxoutType::WITNESS_V1_TAPROOT: return "witness_v1_taproot"; |
| 73 | case TxoutType::WITNESS_UNKNOWN: return "witness_unknown"; |
| 74 | case TxoutType::OP_TRUE: return "true"; |
| 75 | case TxoutType::FEE: return "fee"; |
| 76 | } |
| 77 | assert(false); |
| 78 | } |
| 79 | |
| 80 | static bool MatchPayToPubkey(const CScript& script, valtype& pubkey) |
| 81 | { |
no outgoing calls
no test coverage detected