pub fn round_issuance_range<T: Config>(config: MiningResourceRateInfo) -> MiningRange<Balance> {
	// Get total round per year
	// Initial minting ratio per land unit
	let minting_ratio = config.ratio;
	// Get total deployed land unit circulating
	let total_land_unit_circulating = if T::EstateHandler::get_total_land_units() == 0u64 {
		114690u64
	} else {
		T::EstateHandler::get_total_land_units()
	};

	let issuance_per_round = total_land_unit_circulating
		.checked_mul(minting_ratio)
		.unwrap_or(Zero::zero());

	let staking_allocation = issuance_per_round
		.checked_mul(config.staking_reward.into())
		.unwrap_or(issuance_per_round)
		.checked_div(10000u64)
		.unwrap();

	let mining_allocation = issuance_per_round
		.checked_mul(config.mining_reward.into())
		.unwrap_or(issuance_per_round)
		.checked_div(10000u64)
		.unwrap();

	// Return range - could implement more cases in the future.
	MiningRange {
		min: issuance_per_round.into(),
		ideal: issuance_per_round.into(),
		max: issuance_per_round.into(),
		staking_allocation: staking_allocation.into(),
		mining_allocation: mining_allocation.into(),
	}
}
/// Compute round issuance range from round inflation range and current total issuance
Compute round issuance range from round inflation range and current total issuance
Compute round issuance range from round inflation range and current total issuance
pub fn round_issuance_range<T: Config>(config: MiningResourceRateInfo) -> MiningRange<Balance> {
	// Get total round per year
	// Initial minting ratio per land unit
	let minting_ratio = config.ratio;
	// Get total deployed land unit circulating
	let total_land_unit_circulating = if T::EstateHandler::get_total_land_units() == 0u64 {
		114690u64
	} else {
		T::EstateHandler::get_total_land_units()
	};
	let issuance_per_round = total_land_unit_circulating
		.checked_mul(minting_ratio)
		.unwrap_or(Zero::zero());
	let staking_allocation = issuance_per_round
		.checked_mul(config.staking_reward.into())
		.unwrap_or(issuance_per_round)
		.checked_div(10000u64)
		.unwrap();
	let mining_allocation = issuance_per_round
		.checked_mul(config.mining_reward.into())
		.unwrap_or(issuance_per_round)
		.checked_div(10000u64)
		.unwrap();
	// Return range - could implement more cases in the future.
	MiningRange {
		min: issuance_per_round.into(),
		ideal: issuance_per_round.into(),
		max: issuance_per_round.into(),
		staking_allocation: staking_allocation.into(),
		mining_allocation: mining_allocation.into(),
	}
}
pub fn round_issuance_range < T : Config > ( config : MiningResourceRateInfo ) -> MiningRange < Balance > { // Get total round per year // Initial minting ratio per land unit let minting_ratio = config . ratio ; // Get total deployed land unit circulating let total_land_unit_circulating = if T :: EstateHandler :: get_total_land_units ( ) == 0u64 { 114690u64 } else { T :: EstateHandler :: get_total_land_units ( ) } ; let issuance_per_round = total_land_unit_circulating . checked_mul ( minting_ratio ) . unwrap_or ( Zero :: zero ( ) ) ; let staking_allocation = issuance_per_round . checked_mul ( config . staking_reward . into ( ) ) . unwrap_or ( issuance_per_round ) . checked_div ( 10000u64 ) . unwrap ( ) ; let mining_allocation = issuance_per_round . checked_mul ( config . mining_reward . into ( ) ) . unwrap_or ( issuance_per_round ) . checked_div ( 10000u64 ) . unwrap ( ) ; // Return range - could implement more cases in the future. MiningRange { min : issuance_per_round . into ( ) , ideal : issuance_per_round . into ( ) , max : issuance_per_round . into ( ) , staking_allocation : staking_allocation . into ( ) , mining_allocation : mining_allocation . into ( ) , } }
Compute round issuance range from round inflation range and current total issuance
Compute round issuance range from round inflation range and current total issuance
config
MiningResourceRateInfo