| 298 | } |
| 299 | |
| 300 | void txwatch_inform(const struct chain_topology *topo, |
| 301 | const struct bitcoin_txid *txid, |
| 302 | struct bitcoin_tx *tx TAKES) |
| 303 | { |
| 304 | struct txwatch_hash_iter it; |
| 305 | |
| 306 | for (struct txwatch *txw = txwatch_hash_getfirst(topo->txwatches, txid, &it); |
| 307 | txw; |
| 308 | txw = txwatch_hash_getnext(topo->txwatches, txid, &it)) { |
| 309 | if (txw->tx) |
| 310 | continue; |
| 311 | /* FIXME: YUCK! These don't have PSBTs attached */ |
| 312 | if (!tx->psbt) |
| 313 | tx->psbt = new_psbt(tx, tx->wtx); |
| 314 | txw->tx = clone_bitcoin_tx(txw, tx); |
| 315 | } |
| 316 | |
| 317 | /* If we don't clone above, handle take() now */ |
| 318 | tal_free_if_taken(tx); |
| 319 | } |
| 320 | |
| 321 | struct scriptpubkeywatch { |
| 322 | struct script_with_len swl; |
no test coverage detected