mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 16:14:23 +01:00
common/shutdown_scriptpubkey: extract shutdown scriptpubkey test.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
10
common/shutdown_scriptpubkey.c
Normal file
10
common/shutdown_scriptpubkey.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <bitcoin/script.h>
|
||||
#include <common/shutdown_scriptpubkey.h>
|
||||
|
||||
bool valid_shutdown_scriptpubkey(const u8 *scriptpubkey)
|
||||
{
|
||||
return is_p2pkh(scriptpubkey, NULL)
|
||||
|| is_p2sh(scriptpubkey, NULL)
|
||||
|| is_p2wpkh(scriptpubkey, NULL)
|
||||
|| is_p2wsh(scriptpubkey, NULL);
|
||||
}
|
||||
Reference in New Issue
Block a user