| 59 | } |
| 60 | |
| 61 | void tx_add_anchor_output(struct bitcoin_tx *tx, |
| 62 | const struct pubkey *funding_key) |
| 63 | { |
| 64 | u8 *wscript = bitcoin_wscript_anchor(tmpctx, funding_key); |
| 65 | u8 *p2wsh = scriptpubkey_p2wsh(tmpctx, wscript); |
| 66 | |
| 67 | /* BOLT #3: |
| 68 | * The amount of the output is fixed at 330 sats, the default |
| 69 | * dust limit for P2WSH. |
| 70 | */ |
| 71 | bitcoin_tx_add_output(tx, p2wsh, wscript, AMOUNT_SAT(330)); |
| 72 | } |
| 73 | |
| 74 | struct bitcoin_tx *initial_commit_tx(const tal_t *ctx, |
| 75 | const struct bitcoin_outpoint *funding, |
no test coverage detected