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

Function watch_txid_

lightningd/watch.c:124–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124struct 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
150struct txwatch *find_txwatch_(struct chain_topology *topo,
151 const struct bitcoin_txid *txid,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected