| 280 | }; |
| 281 | |
| 282 | static void openchannel2_hook_serialize(struct openchannel2_payload *payload, |
| 283 | struct json_stream *stream, |
| 284 | struct plugin *plugin) |
| 285 | { |
| 286 | json_object_start(stream, "openchannel2"); |
| 287 | json_add_node_id(stream, "id", &payload->peer_id); |
| 288 | json_add_channel_id(stream, "channel_id", &payload->channel_id); |
| 289 | json_add_amount_sat_msat(stream, |
| 290 | "their_funding_msat", payload->their_funding); |
| 291 | json_add_amount_sat_msat(stream, |
| 292 | "dust_limit_msat", payload->dust_limit_satoshis); |
| 293 | |
| 294 | json_add_amount_msat(stream, "max_htlc_value_in_flight_msat", |
| 295 | payload->max_htlc_value_in_flight_msat); |
| 296 | json_add_amount_msat(stream, "htlc_minimum_msat", |
| 297 | payload->htlc_minimum_msat); |
| 298 | json_add_num(stream, "funding_feerate_per_kw", |
| 299 | payload->funding_feerate_per_kw); |
| 300 | json_add_num(stream, "commitment_feerate_per_kw", |
| 301 | payload->commitment_feerate_per_kw); |
| 302 | json_add_num(stream, "feerate_our_max", |
| 303 | payload->feerate_our_max); |
| 304 | json_add_num(stream, "feerate_our_min", |
| 305 | payload->feerate_our_min); |
| 306 | json_add_num(stream, "to_self_delay", payload->to_self_delay); |
| 307 | json_add_num(stream, "max_accepted_htlcs", payload->max_accepted_htlcs); |
| 308 | json_add_num(stream, "channel_flags", payload->channel_flags); |
| 309 | json_add_num(stream, "locktime", payload->locktime); |
| 310 | if (tal_bytelen(payload->shutdown_scriptpubkey) != 0) |
| 311 | json_add_hex_talarr(stream, "shutdown_scriptpubkey", |
| 312 | payload->shutdown_scriptpubkey); |
| 313 | json_add_amount_sat_msat(stream, "channel_max_msat", |
| 314 | payload->channel_max); |
| 315 | if (payload->requested_lease_amt) { |
| 316 | json_add_amount_sat_msat(stream, "requested_lease_msat", |
| 317 | *payload->requested_lease_amt); |
| 318 | json_add_num(stream, "lease_blockheight_start", |
| 319 | payload->lease_blockheight_start); |
| 320 | json_add_num(stream, "node_blockheight", |
| 321 | payload->node_blockheight); |
| 322 | } |
| 323 | json_add_bool(stream, "require_confirmed_inputs", |
| 324 | payload->req_confirmed_ins_remote); |
| 325 | json_add_channel_type(stream, "channel_type", payload->channel_type); |
| 326 | json_object_end(stream); |
| 327 | } |
| 328 | |
| 329 | struct openchannel2_psbt_payload { |
| 330 | struct subd *dualopend; |
nothing calls this directly
no test coverage detected