Skip to content

Commit e95b762

Browse files
committed
Let onion to string fn private
1 parent 7d9eb3f commit e95b762

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lightning/src/ln/msgs.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -986,12 +986,14 @@ pub fn parse_onion_address(host: &str, port: u16) -> Result<SocketAddress, Socke
986986
}
987987

988988
/// [`SocketAddress::OnionV2`] to debug represent
989-
pub fn to_onion_v2_string(bytes: &[u8; 12]) -> String {
989+
#[inline]
990+
fn to_onion_v2_string(bytes: &[u8; 12]) -> String {
990991
format!("OnionV2({:?})", bytes)
991992
}
992993

993994
/// [`SocketAddress::OnionV3`] to onion address string
994-
pub fn to_onion_v3_string(key: &[u8; 32], checksum: &u16, version: &u8, port: &u16) -> String{
995+
#[inline]
996+
fn to_onion_v3_string(key: &[u8; 32], checksum: &u16, version: &u8, port: &u16) -> String{
995997
let [first_checksum_flag, second_checksum_flag] = checksum.to_be_bytes();
996998
let mut addr = vec![*version, first_checksum_flag, second_checksum_flag];
997999
addr.extend_from_slice(key);

0 commit comments

Comments
 (0)