make gatekeeped amount part of the genesis
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
parent
147542f10c
commit
5b26d4ce28
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ghost-networks"
|
name = "ghost-networks"
|
||||||
version = "0.1.19"
|
version = "0.1.20"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
|
|||||||
@ -255,7 +255,7 @@ pub mod module {
|
|||||||
|
|
||||||
#[pallet::genesis_config]
|
#[pallet::genesis_config]
|
||||||
pub struct GenesisConfig<T: Config> {
|
pub struct GenesisConfig<T: Config> {
|
||||||
pub networks: Vec<(T::NetworkId, Vec<u8>)>,
|
pub networks: Vec<(T::NetworkId, Vec<u8>, BalanceOf<T>)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Config> Default for GenesisConfig<T> {
|
impl<T: Config> Default for GenesisConfig<T> {
|
||||||
@ -270,11 +270,12 @@ pub mod module {
|
|||||||
if !self.networks.is_empty() {
|
if !self.networks.is_empty() {
|
||||||
self.networks
|
self.networks
|
||||||
.iter()
|
.iter()
|
||||||
.for_each(|(chain_id, network_metadata)| {
|
.for_each(|(chain_id, network_metadata, gatekeeper_amount)| {
|
||||||
let network = NetworkData::decode(&mut &network_metadata[..])
|
let network = NetworkData::decode(&mut &network_metadata[..])
|
||||||
.expect("Error decoding NetworkData");
|
.expect("Error decoding NetworkData");
|
||||||
Pallet::<T>::do_register_network(chain_id.clone(), network)
|
Pallet::<T>::do_register_network(chain_id.clone(), network)
|
||||||
.expect("Error registering network");
|
.expect("Error registering network");
|
||||||
|
GatekeeperAmount::<T>::insert(chain_id, gatekeeper_amount);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user