MCPcopy Create free account
hub / github.com/ElementsProject/lightning / queue_until_msg

Function queue_until_msg

onchaind/onchaind.c:162–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162static 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 */
177static bool wally_tx_output_scripteq(const struct wally_tx_output *out,

Callers 2

init_replyFunction · 0.85

Calls 4

fromwire_peektypeFunction · 0.85
onchaind_wire_nameFunction · 0.85
wire_sync_readFunction · 0.50
status_failedFunction · 0.50

Tested by

no test coverage detected