+ onion_utils::set_max_path_length(
+ &mut route_params, &recipient_onion, keysend_preimage, best_block_height
+ )
+ .map_err(|()| {
+ log_error!(logger, "Can't construct an onion packet without exceeding 1300-byte onion \
+ hop_data length for payment with id {} and hash {}", payment_id, payment_hash);
+ RetryableSendFailure::OnionPacketSizeExceeded
+ })?;
+