close_shutdown: make sure script_pubkey is standard.

As per BOLT update 9c3f150d2a44af6ee2c3be03acd6ef80ea184f4e.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-08-31 16:06:32 +09:30
parent 2804a4de7a
commit f90fb4934f
3 changed files with 54 additions and 2 deletions

View File

@@ -109,12 +109,18 @@ u8 **bitcoin_witness_htlc(const tal_t *ctx,
const struct bitcoin_signature *sig,
const u8 *witnessscript);
/* Is this a pay to pubkeu hash? */
bool is_p2pkh(const u8 *script, size_t script_len);
/* Is this a pay to script hash? */
bool is_p2sh(const u8 *script, size_t script_len);
/* Is this (version 0) pay to witness script hash? */
bool is_p2wsh(const u8 *script, size_t script_len);
/* Is this (version 0) pay to witness pubkey hash? */
bool is_p2wpkh(const u8 *script, size_t script_len);
/* Are these two scripts equal? */
bool scripteq(const u8 *s1, size_t s1len, const u8 *s2, size_t s2len);