| 1047 | } |
| 1048 | |
| 1049 | static struct wally_psbt * |
| 1050 | fetch_psbt_changes(struct state *state, |
| 1051 | struct tx_state *tx_state, |
| 1052 | const struct wally_psbt *psbt) |
| 1053 | { |
| 1054 | u8 *msg; |
| 1055 | char *err; |
| 1056 | struct wally_psbt *updated_psbt; |
| 1057 | |
| 1058 | /* Go ask lightningd what other changes we've got */ |
| 1059 | msg = towire_dualopend_psbt_changed(NULL, &state->channel_id, |
| 1060 | tx_state->funding_serial, |
| 1061 | psbt); |
| 1062 | |
| 1063 | wire_sync_write(REQ_FD, take(msg)); |
| 1064 | |
| 1065 | msg = wire_sync_read(tmpctx, REQ_FD); |
| 1066 | #if DEVELOPER |
| 1067 | while (fromwire_dualopend_dev_memleak(msg)) { |
| 1068 | handle_dev_memleak(state, msg); |
| 1069 | msg = wire_sync_read(tmpctx, REQ_FD); |
| 1070 | } |
| 1071 | #endif |
| 1072 | |
| 1073 | if (fromwire_dualopend_fail(msg, msg, &err)) { |
| 1074 | open_err_warn(state, "%s", err); |
| 1075 | } else if (fromwire_dualopend_psbt_updated(state, msg, &updated_psbt)) { |
| 1076 | return updated_psbt; |
| 1077 | } else |
| 1078 | master_badmsg(fromwire_peektype(msg), msg); |
| 1079 | |
| 1080 | return NULL; |
| 1081 | } |
| 1082 | |
| 1083 | static bool send_next(struct state *state, |
| 1084 | struct tx_state *tx_state, |
no test coverage detected