@@ -1466,7 +1466,7 @@ fn do_test_intercepted_payment(test: InterceptTest) {
1466
1466
1467
1467
// Check for unknown channel id error.
1468
1468
let unknown_chan_id_err = nodes[ 1 ] . node . forward_intercepted_htlc ( intercept_id, & [ 42 ; 32 ] , nodes[ 2 ] . node . get_our_node_id ( ) , expected_outbound_amount_msat) . unwrap_err ( ) ;
1469
- assert_eq ! ( unknown_chan_id_err , APIError :: APIMisuseError { err: format!( "Channel with id {:? } not found" , [ 42 ; 32 ] ) } ) ;
1469
+ assert_eq ! ( unknown_chan_id_err , APIError :: ChannelUnavailable { err: format!( "Channel with id {} not found" , log_bytes! ( [ 42 ; 32 ] ) ) } ) ;
1470
1470
1471
1471
if test == InterceptTest :: Fail {
1472
1472
// Ensure we can fail the intercepted payment back.
@@ -1490,7 +1490,7 @@ fn do_test_intercepted_payment(test: InterceptTest) {
1490
1490
// Check that we'll fail as expected when sending to a channel that isn't in `ChannelReady` yet.
1491
1491
let temp_chan_id = nodes[ 1 ] . node . create_channel ( nodes[ 2 ] . node . get_our_node_id ( ) , 100_000 , 0 , 42 , None ) . unwrap ( ) ;
1492
1492
let unusable_chan_err = nodes[ 1 ] . node . forward_intercepted_htlc ( intercept_id, & temp_chan_id, nodes[ 2 ] . node . get_our_node_id ( ) , expected_outbound_amount_msat) . unwrap_err ( ) ;
1493
- assert_eq ! ( unusable_chan_err , APIError :: APIMisuseError { err: format!( "Channel with id {:? } not fully established" , temp_chan_id) } ) ;
1493
+ assert_eq ! ( unusable_chan_err , APIError :: ChannelUnavailable { err: format!( "Channel with id {} not fully established" , log_bytes! ( temp_chan_id) ) } ) ;
1494
1494
assert_eq ! ( nodes[ 1 ] . node. get_and_clear_pending_msg_events( ) . len( ) , 1 ) ;
1495
1495
1496
1496
// Open the just-in-time channel so the payment can then be forwarded.
@@ -1561,6 +1561,6 @@ fn do_test_intercepted_payment(test: InterceptTest) {
1561
1561
// Check for unknown intercept id error.
1562
1562
let ( _, channel_id) = open_zero_conf_channel ( & nodes[ 1 ] , & nodes[ 2 ] , None ) ;
1563
1563
let unknown_intercept_id_err = nodes[ 1 ] . node . forward_intercepted_htlc ( intercept_id, & channel_id, nodes[ 2 ] . node . get_our_node_id ( ) , expected_outbound_amount_msat) . unwrap_err ( ) ;
1564
- assert_eq ! ( unknown_intercept_id_err , APIError :: APIMisuseError { err: format!( "Payment with intercept id {:? } not found" , intercept_id. 0 ) } ) ;
1564
+ assert_eq ! ( unknown_intercept_id_err , APIError :: APIMisuseError { err: format!( "Payment with intercept id {} not found" , log_bytes! ( intercept_id. 0 ) ) } ) ;
1565
1565
}
1566
1566
}
0 commit comments