fn truth_value_update(block_weight: Weight, previous: Multiplier) -> Multiplier {
		let accuracy = Multiplier::accuracy() as f64;
		let previous_float = previous.into_inner() as f64 / accuracy;
		// bump if it is zero.
		let previous_float = previous_float.max(min_multiplier().into_inner() as f64 / accuracy);

		// maximum tx weight
		let m = max_normal() as f64;
		// block weight always truncated to max weight
		let block_weight = (block_weight as f64).min(m);
		let v: f64 = AdjustmentVariable::get().to_float();

		// Ideal saturation in terms of weight
		let ss = target() as f64;
		// Current saturation in terms of weight
		let s = block_weight;

		let t1 = v * (s / m - ss / m);
		let t2 = v.powi(2) * (s / m - ss / m).powi(2) / 2.0;
		let next_float = previous_float * (1.0 + t1 + t2);
		Multiplier::from_float(next_float)
	}
// update based on reference impl.
update based on reference impl.
update based on reference impl .
fn truth_value_update(block_weight: Weight, previous: Multiplier) -> Multiplier {
		let accuracy = Multiplier::accuracy() as f64;
		let previous_float = previous.into_inner() as f64 / accuracy;
		// bump if it is zero.
		let previous_float = previous_float.max(min_multiplier().into_inner() as f64 / accuracy);
		// maximum tx weight
		let m = max_normal() as f64;
		// block weight always truncated to max weight
		let block_weight = (block_weight as f64).min(m);
		let v: f64 = AdjustmentVariable::get().to_float();
		// Ideal saturation in terms of weight
		let ss = target() as f64;
		// Current saturation in terms of weight
		let s = block_weight;
		let t1 = v * (s / m - ss / m);
		let t2 = v.powi(2) * (s / m - ss / m).powi(2) / 2.0;
		let next_float = previous_float * (1.0 + t1 + t2);
		Multiplier::from_float(next_float)
	}
fn truth_value_update ( block_weight : Weight , previous : Multiplier ) -> Multiplier { let accuracy = Multiplier :: accuracy ( ) as f64 ; let previous_float = previous . into_inner ( ) as f64 / accuracy ; // bump if it is zero. let previous_float = previous_float . max ( min_multiplier ( ) . into_inner ( ) as f64 / accuracy ) ; // maximum tx weight let m = max_normal ( ) as f64 ; // block weight always truncated to max weight let block_weight = ( block_weight as f64 ) . min ( m ) ; let v : f64 = AdjustmentVariable :: get ( ) . to_float ( ) ; // Ideal saturation in terms of weight let ss = target ( ) as f64 ; // Current saturation in terms of weight let s = block_weight ; let t1 = v * ( s / m - ss / m ) ; let t2 = v . powi ( 2 ) * ( s / m - ss / m ) . powi ( 2 ) / 2.0 ; let next_float = previous_float * ( 1.0 + t1 + t2 ) ; Multiplier :: from_float ( next_float ) }
update based on reference impl.
update based on reference impl .
block_weight
Weight
previous
Multiplier