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

Function watch_txid

lightningd/watch.c:121–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121struct txwatch *watch_txid(const tal_t *ctx,
122 struct chain_topology *topo,
123 struct channel *channel,
124 const struct bitcoin_txid *txid,
125 enum watch_result (*cb)(struct lightningd *ld,
126 struct channel *,
127 const struct bitcoin_txid *,
128 const struct bitcoin_tx *,
129 unsigned int depth))
130{
131 struct txwatch *w;
132
133 w = tal(ctx, struct txwatch);
134 w->topo = topo;
135 w->depth = 0;
136 w->txid = *txid;
137 w->tx = NULL;
138 w->channel = channel;
139 w->cb = cb;
140
141 txwatch_hash_add(&w->topo->txwatches, w);
142 tal_add_destructor(w, destroy_txwatch);
143
144 return w;
145}
146
147struct txwatch *find_txwatch(struct chain_topology *topo,
148 const struct bitcoin_txid *txid,

Callers 4

channel_watch_fundingFunction · 0.70
channel_watch_inflightFunction · 0.70
watch_txFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected