| 1505 | } |
| 1506 | |
| 1507 | static bool |
| 1508 | fetch_psbt_changes(struct state *state, |
| 1509 | struct tx_state *tx_state, |
| 1510 | const struct wally_psbt *psbt, |
| 1511 | struct wally_psbt **updated_psbt) |
| 1512 | { |
| 1513 | u8 *msg; |
| 1514 | char *err; |
| 1515 | |
| 1516 | /* Go ask lightningd what other changes we've got */ |
| 1517 | msg = towire_dualopend_psbt_changed(NULL, &state->channel_id, |
| 1518 | state->require_confirmed_inputs[REMOTE], |
| 1519 | tx_state->funding_serial, |
| 1520 | psbt, state->channel_type); |
| 1521 | |
| 1522 | wire_sync_write(REQ_FD, take(msg)); |
| 1523 | |
| 1524 | msg = wire_sync_read(tmpctx, REQ_FD); |
| 1525 | while (state->developer && fromwire_dualopend_dev_memleak(msg)) { |
| 1526 | handle_dev_memleak(state, msg); |
| 1527 | msg = wire_sync_read(tmpctx, REQ_FD); |
| 1528 | } |
| 1529 | |
| 1530 | if (fromwire_dualopend_fail(msg, msg, &err)) { |
| 1531 | open_abort(state, "%s", err); |
| 1532 | } else if (fromwire_dualopend_psbt_updated(state, msg, updated_psbt)) { |
| 1533 | return true; |
| 1534 | } else |
| 1535 | master_badmsg(fromwire_peektype(msg), msg); |
| 1536 | |
| 1537 | return false; |
| 1538 | } |
| 1539 | |
| 1540 | static bool send_next(struct state *state, |
| 1541 | struct tx_state *tx_state, |
no test coverage detected