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

Function find_txwatch_

lightningd/watch.c:150–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150struct txwatch *find_txwatch_(struct chain_topology *topo,
151 const struct bitcoin_txid *txid,
152 enum watch_result (*cb)(struct lightningd *ld,
153 const struct bitcoin_txid *,
154 const struct bitcoin_tx *,
155 unsigned int depth,
156 void *arg),
157 void *arg)
158{
159 struct txwatch_hash_iter i;
160 struct txwatch *w;
161
162 /* We could have more than one channel watching same txid, though we
163 * don't for onchaind. */
164 for (w = txwatch_hash_getfirst(topo->txwatches, txid, &i);
165 w;
166 w = txwatch_hash_getnext(topo->txwatches, txid, &i)) {
167 if (w->cb == cb && w->cbarg == arg)
168 break;
169 }
170 return w;
171}
172
173bool watching_txid(const struct chain_topology *topo,
174 const struct bitcoin_txid *txid)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected