pub fn graph_weight(height: u64, edge_bits: u8) -> u64 {
	let mut xpr_edge_bits = edge_bits as u64;

	let bits_over_min = edge_bits.saturating_sub(DEFAULT_MIN_EDGE_BITS);
	let expiry_height = (1 << bits_over_min) * YEAR_HEIGHT;
	if height >= expiry_height {
		xpr_edge_bits = xpr_edge_bits.saturating_sub(1 + (height - expiry_height) / WEEK_HEIGHT);
	}

	(2 << (edge_bits - BASE_EDGE_BITS) as u64) * xpr_edge_bits
}
/// Compute weight of a graph as number of siphash bits defining the graph
/// Must be made dependent on height to phase out smaller size over the years
/// This can wait until end of 2019 at latest
Compute weight of a graph as number of siphash bits defining the graph
Must be made dependent on height to phase out smaller size over the years
This can wait until end of 2019 at latest
Compute weight of a graph as number of siphash bits defining the graph Must be made dependent on height to phase out smaller size over the years This can wait until end of 2019 at latest
pub fn graph_weight(height: u64, edge_bits: u8) -> u64 {
	let mut xpr_edge_bits = edge_bits as u64;
	let bits_over_min = edge_bits.saturating_sub(DEFAULT_MIN_EDGE_BITS);
	let expiry_height = (1 << bits_over_min) * YEAR_HEIGHT;
	if height >= expiry_height {
		xpr_edge_bits = xpr_edge_bits.saturating_sub(1 + (height - expiry_height) / WEEK_HEIGHT);
	}
	(2 << (edge_bits - BASE_EDGE_BITS) as u64) * xpr_edge_bits
}
pub fn graph_weight ( height : u64 , edge_bits : u8 ) -> u64 { let mut xpr_edge_bits = edge_bits as u64 ; let bits_over_min = edge_bits . saturating_sub ( DEFAULT_MIN_EDGE_BITS ) ; let expiry_height = ( 1 << bits_over_min ) * YEAR_HEIGHT ; if height >= expiry_height { xpr_edge_bits = xpr_edge_bits . saturating_sub ( 1 + ( height - expiry_height ) / WEEK_HEIGHT ) ; } ( 2 << ( edge_bits - BASE_EDGE_BITS ) as u64 ) * xpr_edge_bits }
Compute weight of a graph as number of siphash bits defining the graph
Must be made dependent on height to phase out smaller size over the years
This can wait until end of 2019 at latest
Compute weight of a graph as number of siphash bits defining the graph Must be made dependent on height to phase out smaller size over the years This can wait until end of 2019 at latest
height
u64
edge_bits
u8