FIXME: Maybe cache this? */
| 3408 | |
| 3409 | /* FIXME: Maybe cache this? */ |
| 3410 | static struct amount_sat channel_size(struct state *state) |
| 3411 | { |
| 3412 | u32 funding_outnum; |
| 3413 | const u8 *funding_wscript = |
| 3414 | bitcoin_redeem_2of2(tmpctx, |
| 3415 | &state->our_funding_pubkey, |
| 3416 | &state->their_funding_pubkey); |
| 3417 | |
| 3418 | if (!find_txout(state->tx_state->psbt, |
| 3419 | scriptpubkey_p2wsh(tmpctx, funding_wscript), |
| 3420 | &funding_outnum)) { |
| 3421 | open_err_fatal(state, "Cannot fund txout"); |
| 3422 | } |
| 3423 | |
| 3424 | return psbt_output_get_amount(state->tx_state->psbt, funding_outnum); |
| 3425 | } |
| 3426 | |
| 3427 | static void tell_gossipd_new_channel(struct state *state) |
| 3428 | { |
no test coverage detected