| 2541 | } |
| 2542 | |
| 2543 | static void get_anchor_scriptpubkeys(const tal_t *ctx, u8 **anchor) |
| 2544 | { |
| 2545 | if (!option_anchor_outputs) { |
| 2546 | anchor[LOCAL] = anchor[REMOTE] = NULL; |
| 2547 | return; |
| 2548 | } |
| 2549 | |
| 2550 | for (enum side side = 0; side < NUM_SIDES; side++) { |
| 2551 | u8 *wscript = bitcoin_wscript_anchor(tmpctx, |
| 2552 | &funding_pubkey[side]); |
| 2553 | anchor[side] = scriptpubkey_p2wsh(ctx, wscript); |
| 2554 | } |
| 2555 | } |
| 2556 | |
| 2557 | static u8 *scriptpubkey_to_remote(const tal_t *ctx, |
| 2558 | const struct pubkey *remotekey, |
no test coverage detected