| 2979 | } |
| 2980 | |
| 2981 | static void steal_htlc(struct tracked_output *out) |
| 2982 | { |
| 2983 | struct bitcoin_tx *tx; |
| 2984 | enum tx_type tx_type = OUR_PENALTY_TX; |
| 2985 | u8 der[PUBKEY_CMPR_LEN]; |
| 2986 | |
| 2987 | /* BOLT #3: |
| 2988 | * |
| 2989 | * If a revoked commitment transaction is published, the remote node can |
| 2990 | * spend this output immediately with the following witness: |
| 2991 | * |
| 2992 | * <revocation_sig> <revocationpubkey> |
| 2993 | */ |
| 2994 | pubkey_to_der(der, &keyset->self_revocation_key); |
| 2995 | tx = tx_to_us(out, penalty_to_us, out, BITCOIN_TX_RBF_SEQUENCE, 0, |
| 2996 | der, sizeof(der), out->wscript, &tx_type, |
| 2997 | penalty_feerate); |
| 2998 | |
| 2999 | propose_resolution(out, tx, 0, tx_type); |
| 3000 | } |
| 3001 | |
| 3002 | /* Tell wallet that we have discovered a UTXO from a to-remote output, |
| 3003 | * which it can spend with a little additional info we give here. */ |
no test coverage detected