@@ -242,9 +242,19 @@ fn do_chanmon_claim_value_coop_close(anchors: bool) {
242
242
assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose {
243
243
amount_satoshis: 1_000_000 - 1_000 - commitment_tx_fee - anchor_outputs_value,
244
244
transaction_fee_satoshis: commitment_tx_fee,
245
+ outbound_payment_htlc_rounded_msat: 0 ,
246
+ outbound_forwarded_htlc_rounded_msat: 0 ,
247
+ inbound_claiming_htlc_rounded_msat: 0 ,
248
+ inbound_htlc_rounded_msat: 0 ,
245
249
} ] ,
246
250
nodes[ 0 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ;
247
- assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose { amount_satoshis: 1_000 , transaction_fee_satoshis: 0 } ] ,
251
+ assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose {
252
+ amount_satoshis: 1_000 , transaction_fee_satoshis: 0 ,
253
+ outbound_payment_htlc_rounded_msat: 0 ,
254
+ outbound_forwarded_htlc_rounded_msat: 0 ,
255
+ inbound_claiming_htlc_rounded_msat: 0 ,
256
+ inbound_htlc_rounded_msat: 0 ,
257
+ } ] ,
248
258
nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ;
249
259
250
260
nodes[ 0 ] . node . close_channel ( & chan_id, & nodes[ 1 ] . node . get_our_node_id ( ) ) . unwrap ( ) ;
@@ -443,11 +453,19 @@ fn do_test_claim_value_force_close(anchors: bool, prev_commitment_tx: bool) {
443
453
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
444
454
amount_satoshis: 1_000_000 - 3_000 - 4_000 - 1_000 - 3 - commitment_tx_fee - anchor_outputs_value,
445
455
transaction_fee_satoshis: commitment_tx_fee,
456
+ outbound_payment_htlc_rounded_msat: 3000 ,
457
+ outbound_forwarded_htlc_rounded_msat: 0 ,
458
+ inbound_claiming_htlc_rounded_msat: 0 ,
459
+ inbound_htlc_rounded_msat: 0 ,
446
460
} , sent_htlc_balance. clone( ) , sent_htlc_timeout_balance. clone( ) ] ) ,
447
461
sorted_vec( nodes[ 0 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
448
462
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
449
463
amount_satoshis: 1_000 ,
450
464
transaction_fee_satoshis: 0 ,
465
+ outbound_payment_htlc_rounded_msat: 0 ,
466
+ outbound_forwarded_htlc_rounded_msat: 0 ,
467
+ inbound_claiming_htlc_rounded_msat: 0 ,
468
+ inbound_htlc_rounded_msat: 3000 ,
451
469
} , received_htlc_balance. clone( ) , received_htlc_timeout_balance. clone( ) ] ) ,
452
470
sorted_vec( nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
453
471
@@ -495,6 +513,10 @@ fn do_test_claim_value_force_close(anchors: bool, prev_commitment_tx: bool) {
495
513
commitment_tx_fee - // The commitment transaction fee with two HTLC outputs
496
514
anchor_outputs_value, // The anchor outputs value in satoshis
497
515
transaction_fee_satoshis: commitment_tx_fee,
516
+ outbound_payment_htlc_rounded_msat: 3000 ,
517
+ outbound_forwarded_htlc_rounded_msat: 0 ,
518
+ inbound_claiming_htlc_rounded_msat: 0 ,
519
+ inbound_htlc_rounded_msat: 0 ,
498
520
} , sent_htlc_timeout_balance. clone( ) ] ;
499
521
if !prev_commitment_tx {
500
522
a_expected_balances. push ( sent_htlc_balance. clone ( ) ) ;
@@ -504,6 +526,10 @@ fn do_test_claim_value_force_close(anchors: bool, prev_commitment_tx: bool) {
504
526
assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose {
505
527
amount_satoshis: 1_000 + 3_000 + 4_000 ,
506
528
transaction_fee_satoshis: 0 ,
529
+ outbound_payment_htlc_rounded_msat: 0 ,
530
+ outbound_forwarded_htlc_rounded_msat: 0 ,
531
+ inbound_claiming_htlc_rounded_msat: 3000 ,
532
+ inbound_htlc_rounded_msat: 0 ,
507
533
} ] ,
508
534
nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ;
509
535
@@ -987,12 +1013,20 @@ fn test_no_preimage_inbound_htlc_balances() {
987
1013
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
988
1014
amount_satoshis: 1_000_000 - 500_000 - 10_000 - commitment_tx_fee,
989
1015
transaction_fee_satoshis: commitment_tx_fee,
1016
+ outbound_payment_htlc_rounded_msat: 0 ,
1017
+ outbound_forwarded_htlc_rounded_msat: 0 ,
1018
+ inbound_claiming_htlc_rounded_msat: 0 ,
1019
+ inbound_htlc_rounded_msat: 0 ,
990
1020
} , a_received_htlc_balance. clone( ) , a_sent_htlc_balance. clone( ) ] ) ,
991
1021
sorted_vec( nodes[ 0 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
992
1022
993
1023
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
994
1024
amount_satoshis: 500_000 - 20_000 ,
995
1025
transaction_fee_satoshis: 0 ,
1026
+ outbound_payment_htlc_rounded_msat: 0 ,
1027
+ outbound_forwarded_htlc_rounded_msat: 0 ,
1028
+ inbound_claiming_htlc_rounded_msat: 0 ,
1029
+ inbound_htlc_rounded_msat: 0 ,
996
1030
} , b_received_htlc_balance. clone( ) , b_sent_htlc_balance. clone( ) ] ) ,
997
1031
sorted_vec( nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
998
1032
@@ -1272,6 +1306,10 @@ fn do_test_revoked_counterparty_commitment_balances(anchors: bool, confirm_htlc_
1272
1306
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
1273
1307
amount_satoshis: 100_000 - 5_000 - 4_000 - 3 - 2_000 + 3_000 ,
1274
1308
transaction_fee_satoshis: 0 ,
1309
+ outbound_payment_htlc_rounded_msat: 3000 ,
1310
+ outbound_forwarded_htlc_rounded_msat: 0 ,
1311
+ inbound_claiming_htlc_rounded_msat: 0 ,
1312
+ inbound_htlc_rounded_msat: 0 ,
1275
1313
} , Balance :: MaybeTimeoutClaimableHTLC {
1276
1314
amount_satoshis: 2_000 ,
1277
1315
claimable_height: missing_htlc_cltv_timeout,
@@ -1826,6 +1864,10 @@ fn do_test_revoked_counterparty_aggregated_claims(anchors: bool) {
1826
1864
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
1827
1865
amount_satoshis: 100_000 - 4_000 - 3_000 ,
1828
1866
transaction_fee_satoshis: 0 ,
1867
+ outbound_payment_htlc_rounded_msat: 0 ,
1868
+ outbound_forwarded_htlc_rounded_msat: 0 ,
1869
+ inbound_claiming_htlc_rounded_msat: 0 ,
1870
+ inbound_htlc_rounded_msat: 0 ,
1829
1871
} , Balance :: MaybeTimeoutClaimableHTLC {
1830
1872
amount_satoshis: 4_000 ,
1831
1873
claimable_height: htlc_cltv_timeout,
0 commit comments