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

Function queue_until_msg

onchaind/onchaind.c:143–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143static 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 */
158static 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