@@ -1284,26 +1284,26 @@ fn test_duplicate_htlc_different_direction_onchain() {
1284
1284
let claim_txn = nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap().clone();
1285
1285
assert_eq!(claim_txn.len(), 8);
1286
1286
1287
- check_spends!(claim_txn[0], remote_txn[0]);
1287
+ check_spends!(claim_txn[0], remote_txn[0]); // Immediate HTLC claim with preimage
1288
1288
1289
- check_spends!(claim_txn[1], chan_1.3);
1290
- check_spends!(claim_txn[2], claim_txn[1]);
1289
+ check_spends!(claim_txn[1], chan_1.3); // Alternative commitment tx
1290
+ check_spends!(claim_txn[2], claim_txn[1]); // HTLC spend in alternative commitment tx
1291
1291
1292
1292
let bump_tx = if claim_txn[1] == claim_txn[4] {
1293
1293
assert_eq!(claim_txn[1], claim_txn[4]);
1294
1294
assert_eq!(claim_txn[2], claim_txn[5]);
1295
1295
1296
- check_spends!(claim_txn[7], claim_txn[1]);
1296
+ check_spends!(claim_txn[7], claim_txn[1]); // HTLC timeout on alternative commitment tx
1297
1297
1298
- check_spends!(claim_txn[3], remote_txn[0]);
1298
+ check_spends!(claim_txn[3], remote_txn[0]); // HTLC timeout on broadcasted commitment tx
1299
1299
&claim_txn[3]
1300
1300
} else {
1301
1301
assert_eq!(claim_txn[1], claim_txn[3]);
1302
1302
assert_eq!(claim_txn[2], claim_txn[4]);
1303
1303
1304
- check_spends!(claim_txn[5], claim_txn[1]);
1304
+ check_spends!(claim_txn[5], claim_txn[1]); // HTLC timeout on alternative commitment tx
1305
1305
1306
- check_spends!(claim_txn[7], remote_txn[0]);
1306
+ check_spends!(claim_txn[7], remote_txn[0]); // HTLC timeout on broadcasted commitment tx
1307
1307
1308
1308
&claim_txn[7]
1309
1309
};
0 commit comments