Remove unneeded fields from bridgeline and reduce BRIDGE_BYTES
This commit is contained in:
parent
cb159405a3
commit
66f560eb08
|
@ -22,12 +22,9 @@ pub fn parse_into_bridgelines(
|
||||||
.get_uid()
|
.get_uid()
|
||||||
.expect("Unable to get Fingerprint UID of resource");
|
.expect("Unable to get Fingerprint UID of resource");
|
||||||
let infostr: String = format!(
|
let infostr: String = format!(
|
||||||
"type={} protocol={} fingerprint={:?} or_addresses={:?} flags={:?} params={:?}",
|
"type={} fingerprint={:?} params={:?}",
|
||||||
resource.r#type,
|
resource.r#type,
|
||||||
resource.protocol,
|
|
||||||
resource.fingerprint,
|
resource.fingerprint,
|
||||||
resource.or_addresses,
|
|
||||||
resource.flags,
|
|
||||||
resource.params,
|
resource.params,
|
||||||
);
|
);
|
||||||
let mut info_bytes: [u8; BRIDGE_BYTES - 26] = [0; BRIDGE_BYTES - 26];
|
let mut info_bytes: [u8; BRIDGE_BYTES - 26] = [0; BRIDGE_BYTES - 26];
|
||||||
|
|
|
@ -25,7 +25,7 @@ use std::convert::{TryFrom, TryInto};
|
||||||
use subtle::ConstantTimeEq;
|
use subtle::ConstantTimeEq;
|
||||||
|
|
||||||
/// Each bridge information line is serialized into this many bytes
|
/// Each bridge information line is serialized into this many bytes
|
||||||
pub const BRIDGE_BYTES: usize = 300;
|
pub const BRIDGE_BYTES: usize = 200;
|
||||||
|
|
||||||
/// The max number of bridges per bucket
|
/// The max number of bridges per bucket
|
||||||
pub const MAX_BRIDGES_PER_BUCKET: usize = 3;
|
pub const MAX_BRIDGES_PER_BUCKET: usize = 3;
|
||||||
|
|
Loading…
Reference in New Issue