| 122 | } |
| 123 | |
| 124 | struct txwatch *watch_txid_(const tal_t *ctx, |
| 125 | struct chain_topology *topo, |
| 126 | const struct bitcoin_txid *txid, |
| 127 | enum watch_result (*cb)(struct lightningd *ld, |
| 128 | const struct bitcoin_txid *, |
| 129 | const struct bitcoin_tx *, |
| 130 | unsigned int depth, |
| 131 | void *arg), |
| 132 | void *arg) |
| 133 | { |
| 134 | struct txwatch *w; |
| 135 | |
| 136 | w = tal(ctx, struct txwatch); |
| 137 | w->topo = topo; |
| 138 | w->depth = -1; |
| 139 | w->txid = *txid; |
| 140 | w->tx = NULL; |
| 141 | w->cb = cb; |
| 142 | w->cbarg = arg; |
| 143 | |
| 144 | txwatch_hash_add(w->topo->txwatches, w); |
| 145 | tal_add_destructor(w, destroy_txwatch); |
| 146 | |
| 147 | return w; |
| 148 | } |
| 149 | |
| 150 | struct txwatch *find_txwatch_(struct chain_topology *topo, |
| 151 | const struct bitcoin_txid *txid, |
nothing calls this directly
no outgoing calls
no test coverage detected