mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
merge genesis complete block with genesis ended
This commit is contained in:
@@ -72,8 +72,8 @@ pub mod pallet {
|
||||
pub(crate) type Oracle<T: Config> = StorageMap<_, Identity, Coin, u64, OptionQuery>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pallet::getter(fn genesis_complete)]
|
||||
pub(crate) type GenesisComplete<T: Config> = StorageValue<_, (), OptionQuery>;
|
||||
#[pallet::getter(fn genesis_complete_block)]
|
||||
pub(crate) type GenesisCompleteBlock<T: Config> = StorageValue<_, u64, OptionQuery>;
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
|
||||
@@ -87,7 +87,7 @@ pub mod pallet {
|
||||
// Distribute the genesis sri to pools after a month
|
||||
if (n.saturated_into::<u64>() >= final_block) &&
|
||||
Self::oraclization_is_done() &&
|
||||
GenesisComplete::<T>::get().is_none()
|
||||
GenesisCompleteBlock::<T>::get().is_none()
|
||||
{
|
||||
// mint the SRI
|
||||
Coins::<T>::mint(
|
||||
@@ -167,7 +167,7 @@ pub mod pallet {
|
||||
assert_eq!(Coins::<T>::balance(GENESIS_LIQUIDITY_ACCOUNT.into(), coin), Amount(0));
|
||||
}
|
||||
|
||||
GenesisComplete::<T>::set(Some(()));
|
||||
GenesisCompleteBlock::<T>::set(Some(n.saturated_into::<u64>()));
|
||||
}
|
||||
|
||||
// we accept we reached economic security once we can mint smallest amount of a network's coin
|
||||
|
||||
Reference in New Issue
Block a user