Check tx outputs against a single scriptpubkey watch (rescan path). */
| 93 | |
| 94 | /* Check tx outputs against a single scriptpubkey watch (rescan path). */ |
| 95 | static void check_tx_scriptpubkey(struct command *cmd, |
| 96 | const struct bitcoin_tx *tx, |
| 97 | const struct watch *w, |
| 98 | u32 blockheight, |
| 99 | const struct bitcoin_blkid *blockhash, |
| 100 | u32 txindex) |
| 101 | { |
| 102 | for (size_t i = 0; i < tx->wtx->num_outputs; i++) { |
| 103 | if (memeq(tx->wtx->outputs[i].script, |
| 104 | tx->wtx->outputs[i].script_len, |
| 105 | w->key.scriptpubkey.script, |
| 106 | w->key.scriptpubkey.len)) { |
| 107 | bwatch_send_watch_found(cmd, tx, blockheight, w, |
| 108 | txindex, i); |
| 109 | /* Same scriptpubkey may appear in multiple outputs. */ |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | /* Check tx inputs against a single outpoint watch (rescan path). */ |
| 115 | static void check_tx_outpoint(struct command *cmd, |
no test coverage detected