@@ -175,9 +175,19 @@ fn chanmon_claim_value_coop_close() {
175
175
assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose {
176
176
amount_satoshis: 1_000_000 - 1_000 - commitment_fee,
177
177
transaction_fee_satoshis: commitment_fee,
178
+ outbound_payment_htlc_rounded_msat: 0 ,
179
+ outbound_forwarded_htlc_rounded_msat: 0 ,
180
+ inbound_claiming_htlc_rounded_msat: 0 ,
181
+ inbound_htlc_rounded_msat: 0 ,
178
182
} ] ,
179
183
nodes[ 0 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ;
180
- assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose { amount_satoshis: 1_000 , transaction_fee_satoshis: 0 } ] ,
184
+ assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose {
185
+ amount_satoshis: 1_000 , transaction_fee_satoshis: 0 ,
186
+ outbound_payment_htlc_rounded_msat: 0 ,
187
+ outbound_forwarded_htlc_rounded_msat: 0 ,
188
+ inbound_claiming_htlc_rounded_msat: 0 ,
189
+ inbound_htlc_rounded_msat: 0 ,
190
+ } ] ,
181
191
nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ;
182
192
183
193
nodes[ 0 ] . node . close_channel ( & chan_id, & nodes[ 1 ] . node . get_our_node_id ( ) ) . unwrap ( ) ;
@@ -327,11 +337,19 @@ fn do_test_claim_value_force_close(prev_commitment_tx: bool) {
327
337
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
328
338
amount_satoshis: 1_000_000 - 3_000 - 4_000 - 1_000 - 3 - commitment_tx_fee,
329
339
transaction_fee_satoshis: commitment_tx_fee,
340
+ outbound_payment_htlc_rounded_msat: 3000 ,
341
+ outbound_forwarded_htlc_rounded_msat: 0 ,
342
+ inbound_claiming_htlc_rounded_msat: 0 ,
343
+ inbound_htlc_rounded_msat: 0 ,
330
344
} , sent_htlc_balance. clone( ) , sent_htlc_timeout_balance. clone( ) ] ) ,
331
345
sorted_vec( nodes[ 0 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
332
346
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
333
347
amount_satoshis: 1_000 ,
334
348
transaction_fee_satoshis: 0 ,
349
+ outbound_payment_htlc_rounded_msat: 0 ,
350
+ outbound_forwarded_htlc_rounded_msat: 0 ,
351
+ inbound_claiming_htlc_rounded_msat: 0 ,
352
+ inbound_htlc_rounded_msat: 3000 ,
335
353
} , received_htlc_balance. clone( ) , received_htlc_timeout_balance. clone( ) ] ) ,
336
354
sorted_vec( nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
337
355
@@ -378,6 +396,10 @@ fn do_test_claim_value_force_close(prev_commitment_tx: bool) {
378
396
3 - // The dust HTLC value in satoshis
379
397
commitment_tx_fee,
380
398
transaction_fee_satoshis: commitment_tx_fee,
399
+ outbound_payment_htlc_rounded_msat: 3000 ,
400
+ outbound_forwarded_htlc_rounded_msat: 0 ,
401
+ inbound_claiming_htlc_rounded_msat: 0 ,
402
+ inbound_htlc_rounded_msat: 0 ,
381
403
} , sent_htlc_timeout_balance. clone( ) ] ;
382
404
if !prev_commitment_tx {
383
405
a_expected_balances. push ( sent_htlc_balance. clone ( ) ) ;
@@ -387,6 +409,10 @@ fn do_test_claim_value_force_close(prev_commitment_tx: bool) {
387
409
assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose {
388
410
amount_satoshis: 1_000 + 3_000 + 4_000 ,
389
411
transaction_fee_satoshis: 0 ,
412
+ outbound_payment_htlc_rounded_msat: 0 ,
413
+ outbound_forwarded_htlc_rounded_msat: 0 ,
414
+ inbound_claiming_htlc_rounded_msat: 3000 ,
415
+ inbound_htlc_rounded_msat: 0 ,
390
416
} ] ,
391
417
nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ;
392
418
@@ -796,12 +822,20 @@ fn test_no_preimage_inbound_htlc_balances() {
796
822
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
797
823
amount_satoshis: 1_000_000 - 500_000 - 10_000 - commitment_tx_fee,
798
824
transaction_fee_satoshis: commitment_tx_fee,
825
+ outbound_payment_htlc_rounded_msat: 0 ,
826
+ outbound_forwarded_htlc_rounded_msat: 0 ,
827
+ inbound_claiming_htlc_rounded_msat: 0 ,
828
+ inbound_htlc_rounded_msat: 0 ,
799
829
} , a_received_htlc_balance. clone( ) , a_sent_htlc_balance. clone( ) ] ) ,
800
830
sorted_vec( nodes[ 0 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
801
831
802
832
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
803
833
amount_satoshis: 500_000 - 20_000 ,
804
834
transaction_fee_satoshis: 0 ,
835
+ outbound_payment_htlc_rounded_msat: 0 ,
836
+ outbound_forwarded_htlc_rounded_msat: 0 ,
837
+ inbound_claiming_htlc_rounded_msat: 0 ,
838
+ inbound_htlc_rounded_msat: 0 ,
805
839
} , b_received_htlc_balance. clone( ) , b_sent_htlc_balance. clone( ) ] ) ,
806
840
sorted_vec( nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
807
841
@@ -1076,6 +1110,10 @@ fn do_test_revoked_counterparty_commitment_balances(confirm_htlc_spend_first: bo
1076
1110
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
1077
1111
amount_satoshis: 100_000 - 5_000 - 4_000 - 3 - 2_000 + 3_000 ,
1078
1112
transaction_fee_satoshis: 0 ,
1113
+ outbound_payment_htlc_rounded_msat: 3000 ,
1114
+ outbound_forwarded_htlc_rounded_msat: 0 ,
1115
+ inbound_claiming_htlc_rounded_msat: 0 ,
1116
+ inbound_htlc_rounded_msat: 0 ,
1079
1117
} , Balance :: MaybeTimeoutClaimableHTLC {
1080
1118
amount_satoshis: 2_000 ,
1081
1119
claimable_height: missing_htlc_cltv_timeout,
@@ -1517,6 +1555,10 @@ fn test_revoked_counterparty_aggregated_claims() {
1517
1555
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
1518
1556
amount_satoshis: 100_000 - 4_000 - 3_000 ,
1519
1557
transaction_fee_satoshis: 0 ,
1558
+ outbound_payment_htlc_rounded_msat: 0 ,
1559
+ outbound_forwarded_htlc_rounded_msat: 0 ,
1560
+ inbound_claiming_htlc_rounded_msat: 0 ,
1561
+ inbound_htlc_rounded_msat: 0 ,
1520
1562
} , Balance :: MaybeTimeoutClaimableHTLC {
1521
1563
amount_satoshis: 4_000 ,
1522
1564
claimable_height: htlc_cltv_timeout,
0 commit comments