| 160 | } |
| 161 | |
| 162 | static const u8 *queue_until_msg(const tal_t *ctx, enum onchaind_wire mtype) |
| 163 | { |
| 164 | const u8 *msg; |
| 165 | |
| 166 | while ((msg = wire_sync_read(ctx, REQ_FD)) != NULL) { |
| 167 | if (fromwire_peektype(msg) == mtype) |
| 168 | return msg; |
| 169 | /* Process later */ |
| 170 | tal_arr_expand(&queued_msgs, tal_steal(queued_msgs, msg)); |
| 171 | } |
| 172 | status_failed(STATUS_FAIL_HSM_IO, "Waiting for %s: connection lost", |
| 173 | onchaind_wire_name(mtype)); |
| 174 | } |
| 175 | |
| 176 | /* helper to compare output script with our tal'd script */ |
| 177 | static bool wally_tx_output_scripteq(const struct wally_tx_output *out, |
no test coverage detected