| 47 | } |
| 48 | |
| 49 | bool valid_shutdown_scriptpubkey(const u8 *scriptpubkey, |
| 50 | bool anysegwit, |
| 51 | bool anchors) |
| 52 | { |
| 53 | if (!anchors) { |
| 54 | if (is_p2pkh(scriptpubkey, NULL) |
| 55 | || is_p2sh(scriptpubkey, NULL)) |
| 56 | return true; |
| 57 | } |
| 58 | |
| 59 | return is_p2wpkh(scriptpubkey, NULL) |
| 60 | || is_p2wsh(scriptpubkey, NULL) |
| 61 | || (anysegwit && is_valid_witnessprog(scriptpubkey)); |
| 62 | } |
no test coverage detected