| 141 | } |
| 142 | |
| 143 | static const u8 *queue_until_msg(const tal_t *ctx, enum onchaind_wire mtype) |
| 144 | { |
| 145 | const u8 *msg; |
| 146 | |
| 147 | while ((msg = wire_sync_read(ctx, REQ_FD)) != NULL) { |
| 148 | if (fromwire_peektype(msg) == mtype) |
| 149 | return msg; |
| 150 | /* Process later */ |
| 151 | tal_arr_expand(&queued_msgs, tal_steal(queued_msgs, msg)); |
| 152 | } |
| 153 | status_failed(STATUS_FAIL_HSM_IO, "Waiting for %s: connection lost", |
| 154 | onchaind_wire_name(mtype)); |
| 155 | } |
| 156 | |
| 157 | /* helper to compare output script with our tal'd script */ |
| 158 | static bool wally_tx_output_scripteq(const struct wally_tx_output *out, |
no test coverage detected