| 854 | } |
| 855 | |
| 856 | u8 *bitcoin_wscript_anchor(const tal_t *ctx, |
| 857 | const struct pubkey *funding_pubkey) |
| 858 | { |
| 859 | u8 *script = tal_arr(ctx, u8, 0); |
| 860 | |
| 861 | /* BOLT #3: |
| 862 | * #### `to_local_anchor` and `to_remote_anchor` Output (option_anchors) |
| 863 | *... |
| 864 | * <local_funding_pubkey/remote_funding_pubkey> OP_CHECKSIG OP_IFDUP |
| 865 | * OP_NOTIF |
| 866 | * OP_16 OP_CHECKSEQUENCEVERIFY |
| 867 | * OP_ENDIF |
| 868 | */ |
| 869 | add_push_key(&script, funding_pubkey); |
| 870 | add_op(&script, OP_CHECKSIG); |
| 871 | add_op(&script, OP_IFDUP); |
| 872 | add_op(&script, OP_NOTIF); |
| 873 | add_number(&script, 16); |
| 874 | add_op(&script, OP_CHECKSEQUENCEVERIFY); |
| 875 | add_op(&script, OP_ENDIF); |
| 876 | |
| 877 | return script; |
| 878 | } |
| 879 | |
| 880 | bool scripteq(const u8 *s1, const u8 *s2) |
| 881 | { |
no test coverage detected