mirror of
https://git.ghostchain.io/proxmio/ghost-node.git
synced 2025-12-27 11:19:57 +00:00
no need for finality delay to be an Option<u64>
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
@@ -54,8 +54,8 @@ pub struct NetworkData {
|
||||
pub default_endpoint: Vec<u8>,
|
||||
pub gatekeeper: Vec<u8>,
|
||||
pub topic_name: Vec<u8>,
|
||||
pub finality_delay: Option<u64>,
|
||||
pub network_type: NetworkType,
|
||||
pub finality_delay: u64,
|
||||
pub block_distance: u64,
|
||||
pub incoming_fee: u32,
|
||||
pub outgoing_fee: u32,
|
||||
@@ -157,7 +157,7 @@ pub mod module {
|
||||
NetworkRegistered { chain_id: T::NetworkId, network: NetworkData },
|
||||
NetworkNameUpdated { chain_id: T::NetworkId, chain_name: Vec<u8> },
|
||||
NetworkEndpointUpdated { chain_id: T::NetworkId, default_endpoint: Vec<u8> },
|
||||
NetworkFinalityDelayUpdated { chain_id: T::NetworkId, finality_delay: Option<u64> },
|
||||
NetworkFinalityDelayUpdated { chain_id: T::NetworkId, finality_delay: u64 },
|
||||
NetworkBlockDistanceUpdated { chain_id: T::NetworkId, block_distance: u64 },
|
||||
NetworkTypeUpdated { chain_id: T::NetworkId, network_type: NetworkType },
|
||||
NetworkGatekeeperUpdated { chain_id: T::NetworkId, gatekeeper: Vec<u8> },
|
||||
@@ -293,7 +293,7 @@ pub mod module {
|
||||
pub fn update_network_finality_delay(
|
||||
origin: OriginFor<T>,
|
||||
chain_id: T::NetworkId,
|
||||
finality_delay: Option<u64>,
|
||||
finality_delay: u64,
|
||||
) -> DispatchResult {
|
||||
T::UpdateOrigin::ensure_origin_or_root(origin)?;
|
||||
Self::do_update_network_finality_delay(
|
||||
@@ -468,7 +468,7 @@ impl<T: Config> Pallet<T> {
|
||||
/// Update existent network default endpoint.
|
||||
pub fn do_update_network_finality_delay(
|
||||
chain_id: T::NetworkId,
|
||||
finality_delay: Option<u64>,
|
||||
finality_delay: u64,
|
||||
) -> DispatchResult {
|
||||
Networks::<T>::try_mutate(&chain_id, |maybe_network| -> DispatchResult {
|
||||
ensure!(maybe_network.is_some(), Error::<T>::NetworkDoesNotExist);
|
||||
|
||||
Reference in New Issue
Block a user