| 1432 | } |
| 1433 | |
| 1434 | static bool |
| 1435 | fetch_psbt_changes(struct state *state, |
| 1436 | struct tx_state *tx_state, |
| 1437 | const struct wally_psbt *psbt, |
| 1438 | struct wally_psbt **updated_psbt) |
| 1439 | { |
| 1440 | u8 *msg; |
| 1441 | char *err; |
| 1442 | |
| 1443 | /* Go ask lightningd what other changes we've got */ |
| 1444 | msg = towire_dualopend_psbt_changed(NULL, &state->channel_id, |
| 1445 | state->require_confirmed_inputs[REMOTE], |
| 1446 | tx_state->funding_serial, |
| 1447 | psbt, state->channel_type); |
| 1448 | |
| 1449 | wire_sync_write(REQ_FD, take(msg)); |
| 1450 | |
| 1451 | msg = wire_sync_read(tmpctx, REQ_FD); |
| 1452 | while (state->developer && fromwire_dualopend_dev_memleak(msg)) { |
| 1453 | handle_dev_memleak(state, msg); |
| 1454 | msg = wire_sync_read(tmpctx, REQ_FD); |
| 1455 | } |
| 1456 | |
| 1457 | if (fromwire_dualopend_fail(msg, msg, &err)) { |
| 1458 | open_abort(state, "%s", err); |
| 1459 | } else if (fromwire_dualopend_psbt_updated(state, msg, updated_psbt)) { |
| 1460 | return true; |
| 1461 | } else |
| 1462 | master_badmsg(fromwire_peektype(msg), msg); |
| 1463 | |
| 1464 | return false; |
| 1465 | } |
| 1466 | |
| 1467 | static bool send_next(struct state *state, |
| 1468 | struct tx_state *tx_state, |
no test coverage detected