@@ -693,7 +693,7 @@ fn test_update_fee_that_funder_cannot_afford() {
693
693
*feerate_lock += 4;
694
694
}
695
695
nodes[0].node.timer_tick_occurred();
696
- nodes[0].logger.assert_log("lightning::ln::channel".to_string() , format!("Cannot afford to send new feerate at {}", feerate + 4), 1);
696
+ nodes[0].logger.assert_log("lightning::ln::channel", format!("Cannot afford to send new feerate at {}", feerate + 4), 1);
697
697
check_added_monitors!(nodes[0], 0);
698
698
699
699
const INITIAL_COMMITMENT_NUMBER: u64 = 281474976710654;
@@ -768,7 +768,7 @@ fn test_update_fee_that_funder_cannot_afford() {
768
768
//check to see if the funder, who sent the update_fee request, can afford the new fee (funder_balance >= fee+channel_reserve)
769
769
//Should produce and error.
770
770
nodes[1].node.handle_commitment_signed(&nodes[0].node.get_our_node_id(), &commit_signed_msg);
771
- nodes[1].logger.assert_log("lightning::ln::channelmanager".to_string() , "Funding remote cannot afford proposed new fee".to_string(), 1);
771
+ nodes[1].logger.assert_log("lightning::ln::channelmanager", "Funding remote cannot afford proposed new fee".to_string(), 1);
772
772
check_added_monitors!(nodes[1], 1);
773
773
check_closed_broadcast!(nodes[1], true);
774
774
check_closed_event!(nodes[1], 1, ClosureReason::ProcessingError { err: String::from("Funding remote cannot afford proposed new fee") },
@@ -1529,7 +1529,7 @@ fn test_fee_spike_violation_fails_htlc() {
1529
1529
},
1530
1530
_ => panic!("Unexpected event"),
1531
1531
};
1532
- nodes[1].logger.assert_log("lightning::ln::channel".to_string() ,
1532
+ nodes[1].logger.assert_log("lightning::ln::channel",
1533
1533
format!("Attempting to fail HTLC due to fee spike buffer violation in channel {}. Rebalancing is required.", raa_msg.channel_id), 1);
1534
1534
1535
1535
check_added_monitors!(nodes[1], 2);
@@ -1617,7 +1617,7 @@ fn test_chan_reserve_violation_inbound_htlc_outbound_channel() {
1617
1617
1618
1618
nodes[0].node.handle_update_add_htlc(&nodes[1].node.get_our_node_id(), &msg);
1619
1619
// Check that the payment failed and the channel is closed in response to the malicious UpdateAdd.
1620
- nodes[0].logger.assert_log("lightning::ln::channelmanager".to_string() , "Cannot accept HTLC that would put our balance under counterparty-announced channel reserve value".to_string(), 1);
1620
+ nodes[0].logger.assert_log("lightning::ln::channelmanager", "Cannot accept HTLC that would put our balance under counterparty-announced channel reserve value".to_string(), 1);
1621
1621
assert_eq!(nodes[0].node.list_channels().len(), 0);
1622
1622
let err_msg = check_closed_broadcast!(nodes[0], true).unwrap();
1623
1623
assert_eq!(err_msg.data, "Cannot accept HTLC that would put our balance under counterparty-announced channel reserve value");
@@ -1796,7 +1796,7 @@ fn test_chan_reserve_violation_inbound_htlc_inbound_chan() {
1796
1796
1797
1797
nodes[1].node.handle_update_add_htlc(&nodes[0].node.get_our_node_id(), &msg);
1798
1798
// Check that the payment failed and the channel is closed in response to the malicious UpdateAdd.
1799
- nodes[1].logger.assert_log("lightning::ln::channelmanager".to_string() , "Remote HTLC add would put them under remote reserve value".to_string(), 1);
1799
+ nodes[1].logger.assert_log("lightning::ln::channelmanager", "Remote HTLC add would put them under remote reserve value".to_string(), 1);
1800
1800
assert_eq!(nodes[1].node.list_channels().len(), 1);
1801
1801
let err_msg = check_closed_broadcast!(nodes[1], true).unwrap();
1802
1802
assert_eq!(err_msg.data, "Remote HTLC add would put them under remote reserve value");
@@ -5930,7 +5930,7 @@ fn test_fail_holding_cell_htlc_upon_free() {
5930
5930
// us to surface its failure to the user.
5931
5931
chan_stat = get_channel_value_stat!(nodes[0], nodes[1], chan.2);
5932
5932
assert_eq!(chan_stat.holding_cell_outbound_amount_msat, 0);
5933
- nodes[0].logger.assert_log("lightning::ln::channel".to_string() , format!("Freeing holding cell with 1 HTLC updates in channel {}", chan.2), 1);
5933
+ nodes[0].logger.assert_log("lightning::ln::channel", format!("Freeing holding cell with 1 HTLC updates in channel {}", chan.2), 1);
5934
5934
5935
5935
// Check that the payment failed to be sent out.
5936
5936
let events = nodes[0].node.get_and_clear_pending_events();
@@ -6018,7 +6018,7 @@ fn test_free_and_fail_holding_cell_htlcs() {
6018
6018
// to surface its failure to the user. The first payment should succeed.
6019
6019
chan_stat = get_channel_value_stat!(nodes[0], nodes[1], chan.2);
6020
6020
assert_eq!(chan_stat.holding_cell_outbound_amount_msat, 0);
6021
- nodes[0].logger.assert_log("lightning::ln::channel".to_string() , format!("Freeing holding cell with 2 HTLC updates in channel {}", chan.2), 1);
6021
+ nodes[0].logger.assert_log("lightning::ln::channel", format!("Freeing holding cell with 2 HTLC updates in channel {}", chan.2), 1);
6022
6022
6023
6023
// Check that the second payment failed to be sent out.
6024
6024
let events = nodes[0].node.get_and_clear_pending_events();
@@ -6292,7 +6292,7 @@ fn test_update_add_htlc_bolt2_receiver_zero_value_msat() {
6292
6292
updates.update_add_htlcs[0].amount_msat = 0;
6293
6293
6294
6294
nodes[1].node.handle_update_add_htlc(&nodes[0].node.get_our_node_id(), &updates.update_add_htlcs[0]);
6295
- nodes[1].logger.assert_log("lightning::ln::channelmanager".to_string() , "Remote side tried to send a 0-msat HTLC".to_string(), 1);
6295
+ nodes[1].logger.assert_log("lightning::ln::channelmanager", "Remote side tried to send a 0-msat HTLC".to_string(), 1);
6296
6296
check_closed_broadcast!(nodes[1], true).unwrap();
6297
6297
check_added_monitors!(nodes[1], 1);
6298
6298
check_closed_event!(nodes[1], 1, ClosureReason::ProcessingError { err: "Remote side tried to send a 0-msat HTLC".to_string() },
@@ -9843,10 +9843,10 @@ fn do_test_max_dust_htlc_exposure(dust_outbound_balance: bool, exposure_breach_e
9843
9843
// Outbound dust balance: 6399 sats
9844
9844
let dust_inbound_overflow = dust_inbound_htlc_on_holder_tx_msat * (dust_inbound_htlc_on_holder_tx + 1);
9845
9845
let dust_outbound_overflow = dust_outbound_htlc_on_holder_tx_msat * dust_outbound_htlc_on_holder_tx + dust_inbound_htlc_on_holder_tx_msat;
9846
- nodes[0].logger.assert_log("lightning::ln::channel".to_string() , format!("Cannot accept value that would put our exposure to dust HTLCs at {} over the limit {} on holder commitment tx", if dust_outbound_balance { dust_outbound_overflow } else { dust_inbound_overflow }, max_dust_htlc_exposure_msat), 1);
9846
+ nodes[0].logger.assert_log("lightning::ln::channel", format!("Cannot accept value that would put our exposure to dust HTLCs at {} over the limit {} on holder commitment tx", if dust_outbound_balance { dust_outbound_overflow } else { dust_inbound_overflow }, max_dust_htlc_exposure_msat), 1);
9847
9847
} else {
9848
9848
// Outbound dust balance: 5200 sats
9849
- nodes[0].logger.assert_log("lightning::ln::channel".to_string() ,
9849
+ nodes[0].logger.assert_log("lightning::ln::channel",
9850
9850
format!("Cannot accept value that would put our exposure to dust HTLCs at {} over the limit {} on counterparty commitment tx",
9851
9851
dust_htlc_on_counterparty_tx_msat * (dust_htlc_on_counterparty_tx - 1) + dust_htlc_on_counterparty_tx_msat + 4,
9852
9852
max_dust_htlc_exposure_msat), 1);
0 commit comments