File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -490,9 +490,6 @@ pub(crate) const MIN_AFFORDABLE_HTLC_COUNT: usize = 4;
490
490
// Holder designates channel data owned for the benefice of the user client.
491
491
// Counterparty designates channel data owned by the another channel participant entity.
492
492
pub ( super ) struct Channel < Signer : Sign > {
493
- #[ cfg( any( test, feature = "_test_utils" ) ) ]
494
- pub ( crate ) config : LegacyChannelConfig ,
495
- #[ cfg( not( any( test, feature = "_test_utils" ) ) ) ]
496
493
config : LegacyChannelConfig ,
497
494
498
495
// Track the previous `ChannelConfig` so that we can continue forwarding HTLCs that were
Original file line number Diff line number Diff line change @@ -531,9 +531,14 @@ fn do_retry_with_no_persist(confirm_before_reload: bool) {
531
531
// Update the fee on the middle hop to ensure PaymentSent events have the correct (retried) fee
532
532
// and not the original fee. We also update node[1]'s relevant config as
533
533
// do_claim_payment_along_route expects us to never overpay.
534
- nodes[ 1 ] . node . channel_state . lock ( ) . unwrap ( ) . by_id . get_mut ( & chan_id_2) . unwrap ( )
535
- . config . options . forwarding_fee_base_msat += 100_000 ;
536
- new_route. paths [ 0 ] [ 0 ] . fee_msat += 100_000 ;
534
+ {
535
+ let mut channel_state = nodes[ 1 ] . node . channel_state . lock ( ) . unwrap ( ) ;
536
+ let mut channel = channel_state. by_id . get_mut ( & chan_id_2) . unwrap ( ) ;
537
+ let mut new_config = channel. get_config ( ) ;
538
+ new_config. forwarding_fee_base_msat += 100_000 ;
539
+ channel. update_config ( & new_config, false ) ;
540
+ new_route. paths [ 0 ] [ 0 ] . fee_msat += 100_000 ;
541
+ }
537
542
538
543
assert ! ( nodes[ 0 ] . node. retry_payment( & new_route, payment_id_1) . is_err( ) ) ; // Shouldn't be allowed to retry a fulfilled payment
539
544
nodes[ 0 ] . node . retry_payment ( & new_route, payment_id) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments