| 148 | } |
| 149 | |
| 150 | struct 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 | |
| 173 | bool watching_txid(const struct chain_topology *topo, |
| 174 | const struct bitcoin_txid *txid) |
nothing calls this directly
no outgoing calls
no test coverage detected