| 184 | } |
| 185 | |
| 186 | u8 *no_upfront_shutdown_script(const tal_t *ctx, |
| 187 | struct feature_set *our_features, |
| 188 | const u8 *their_features) |
| 189 | { |
| 190 | #if DEVELOPER |
| 191 | /* This is a hack, for feature testing */ |
| 192 | const char *e = getenv("DEV_OPENINGD_UPFRONT_SHUTDOWN_SCRIPT"); |
| 193 | if (e) |
| 194 | return tal_hexdata(ctx, e, strlen(e)); |
| 195 | #endif |
| 196 | |
| 197 | /* BOLT #2: |
| 198 | * |
| 199 | * - if both nodes advertised the `option_upfront_shutdown_script` |
| 200 | * feature: |
| 201 | * - MUST include `upfront_shutdown_script` with either a valid |
| 202 | * `shutdown_scriptpubkey` as required by `shutdown` |
| 203 | * `scriptpubkey`, or a zero-length `shutdown_scriptpubkey` |
| 204 | * (ie. `0x0000`). |
| 205 | */ |
| 206 | if (feature_negotiated(our_features, their_features, |
| 207 | OPT_UPFRONT_SHUTDOWN_SCRIPT)) |
| 208 | return tal_arr(ctx, u8, 0); |
| 209 | |
| 210 | return NULL; |
| 211 | } |
| 212 | |
| 213 | void validate_initial_commitment_signature(int hsm_fd, |
| 214 | struct bitcoin_tx *tx, |
no test coverage detected