OpenGov improvements for Kusama (#6372)

* Tweaks to optimise gov2

* Use new inactive funds

* Introduce migrations

* Fixes

* Fixes

* Fixes

* Some constant updates for Fellowship

* Further tweaks

* Lower floor for whitelisted
This commit is contained in:
Gavin Wood
2022-12-05 16:40:25 +00:00
committed by GitHub
parent e79977e694
commit 053b24ebe5
13 changed files with 134 additions and 57 deletions
@@ -51,6 +51,8 @@
pub mod migration;
// TODO: Expose the total amount held.
use crate::{
slot_range::SlotRange,
traits::{Auctioneer, Registrar},
@@ -488,6 +490,7 @@ pub mod pallet {
ensure!(balance > Zero::zero(), Error::<T>::NoContributions);
CurrencyOf::<T>::transfer(&fund_account, &who, balance, AllowDeath)?;
CurrencyOf::<T>::reactivate(balance);
Self::contribution_kill(fund.fund_index, &who);
fund.raised = fund.raised.saturating_sub(balance);
@@ -527,6 +530,7 @@ pub mod pallet {
break
}
CurrencyOf::<T>::transfer(&fund_account, &who, balance, AllowDeath)?;
CurrencyOf::<T>::reactivate(balance);
Self::contribution_kill(fund.fund_index, &who);
fund.raised = fund.raised.saturating_sub(balance);
refund_count += 1;
@@ -777,6 +781,7 @@ impl<T: Config> Pallet<T> {
}
CurrencyOf::<T>::transfer(&who, &fund_account, value, existence)?;
CurrencyOf::<T>::deactivate(value);
let balance = old_balance.saturating_add(value);
Self::contribution_put(fund.fund_index, &who, &balance, &memo);