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

Function watch_txo

lightningd/watch.c:188–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188struct txowatch *watch_txo(const tal_t *ctx,
189 struct chain_topology *topo,
190 struct channel *channel,
191 const struct bitcoin_outpoint *outpoint,
192 enum watch_result (*cb)(struct channel *channel_,
193 const struct bitcoin_tx *tx,
194 size_t input_num,
195 const struct block *block))
196{
197 struct txowatch *w = tal(ctx, struct txowatch);
198
199 w->topo = topo;
200 w->out = *outpoint;
201 w->channel = channel;
202 w->cb = cb;
203
204 txowatch_hash_add(&w->topo->txowatches, w);
205 tal_add_destructor(w, destroy_txowatch);
206
207 return w;
208}
209
210/* Returns true if we fired a callback */
211static bool txw_fire(struct txwatch *txw,

Callers 4

channel_watch_fundingFunction · 0.70
channel_watch_inflightFunction · 0.70
watch_tx_and_outputsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected