| 1212 | } |
| 1213 | |
| 1214 | static void propose_resolution_at_block(struct tracked_output *out, |
| 1215 | const struct bitcoin_tx *tx, |
| 1216 | unsigned int block_required, |
| 1217 | enum tx_type tx_type) |
| 1218 | { |
| 1219 | u32 depth; |
| 1220 | |
| 1221 | /* Expiry could be in the past! */ |
| 1222 | if (block_required < out->tx_blockheight) |
| 1223 | depth = 0; |
| 1224 | else /* Note that out->tx_blockheight is already at depth 1 */ |
| 1225 | depth = block_required - out->tx_blockheight + 1; |
| 1226 | propose_resolution(out, tx, depth, tx_type); |
| 1227 | } |
| 1228 | |
| 1229 | static bool is_valid_sig(const u8 *e) |
| 1230 | { |
no test coverage detected