| 1534 | } |
| 1535 | |
| 1536 | static bool |
| 1537 | fetch_psbt_changes(struct state *state, |
| 1538 | struct tx_state *tx_state, |
| 1539 | const struct wally_psbt *psbt, |
| 1540 | struct wally_psbt **updated_psbt) |
| 1541 | { |
| 1542 | u8 *msg; |
| 1543 | char *err; |
| 1544 | |
| 1545 | /* Go ask lightningd what other changes we've got */ |
| 1546 | msg = towire_dualopend_psbt_changed(NULL, &state->channel_id, |
| 1547 | state->require_confirmed_inputs[REMOTE], |
| 1548 | tx_state->funding_serial, |
| 1549 | psbt, state->channel_type); |
| 1550 | |
| 1551 | wire_sync_write(REQ_FD, take(msg)); |
| 1552 | |
| 1553 | msg = wire_sync_read(tmpctx, REQ_FD); |
| 1554 | while (state->developer && fromwire_dualopend_dev_memleak(msg)) { |
| 1555 | handle_dev_memleak(state, msg); |
| 1556 | msg = wire_sync_read(tmpctx, REQ_FD); |
| 1557 | } |
| 1558 | |
| 1559 | if (fromwire_dualopend_fail(msg, msg, &err)) { |
| 1560 | open_abort(state, "%s", err); |
| 1561 | } else if (fromwire_dualopend_psbt_updated(state, msg, updated_psbt)) { |
| 1562 | return true; |
| 1563 | } else |
| 1564 | master_badmsg(fromwire_peektype(msg), msg); |
| 1565 | |
| 1566 | return false; |
| 1567 | } |
| 1568 | |
| 1569 | static bool send_next(struct state *state, |
| 1570 | struct tx_state *tx_state, |
no test coverage detected