use frame_support::weights::Weight;

pub struct DkgRemovalResult {
    weight: Weight,
    cleared: bool,
}

impl DkgRemovalResult {
    pub fn new<F>(try_clean_storage: F) -> Self
	where
		F: FnOnce() -> (Weight, bool)
	{
        let (weight, cleared) = try_clean_storage();
        Self { weight, cleared }
    }

    pub fn fully_cleared(&self) -> bool {
        self.cleared
    }

    pub fn used_weight(&self) -> Weight {
        self.weight
    }
}
