| 224 | } |
| 225 | |
| 226 | void bwatch_process_block_txs(struct command *cmd, |
| 227 | struct bwatch *bwatch, |
| 228 | const struct bitcoin_block *block, |
| 229 | u32 blockheight, |
| 230 | const struct bitcoin_blkid *blockhash, |
| 231 | const struct watch *w) |
| 232 | { |
| 233 | for (size_t i = 0; i < tal_count(block->tx); i++) { |
| 234 | if (w) |
| 235 | check_tx_for_single_watch(cmd, w, block->tx[i], |
| 236 | blockheight, blockhash, i); |
| 237 | else |
| 238 | check_tx_against_all_watches(cmd, bwatch, block->tx[i], |
| 239 | blockheight, blockhash, i); |
| 240 | } |
| 241 | |
| 242 | bwatch_check_scid_watches(cmd, bwatch, block, blockheight, w); |
| 243 | } |
| 244 | |
| 245 | /* Fire depth notifications for every active blockdepth watch. |
| 246 | * A watch with start_block > new_height is stale: its confirming block |
no test coverage detected