Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

[fix docs compiler warnings] Glutton pallet #14664

Merged
merged 4 commits into from
Aug 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions frame/glutton/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
//! `Compute` and `Storage` parameters the pallet consumes the adequate amount
//! of weight.

#![deny(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]

#[cfg(feature = "runtime-benchmarks")]
Expand Down Expand Up @@ -75,11 +76,20 @@ pub mod pallet {
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event {
/// The pallet has been (re)initialized.
PalletInitialized { reinit: bool },
PalletInitialized {
/// Whether the pallet has been re-initialized.
reinit: bool,
},
/// The computation limit has been updated.
ComputationLimitSet { compute: FixedU64 },
ComputationLimitSet {
/// The computation limit.
Comment on lines 83 to +85
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annoying that we say "compute" everywhere else and "computation" here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep agree. Right now the goal is to fix the warnings. We may want to do a pass on renaming some the variables to be more accurate in a follow-up. For this one, it makes more sense to use the term "computation" over "compute" imo.

compute: FixedU64,
},
/// The storage limit has been updated.
StorageLimitSet { storage: FixedU64 },
StorageLimitSet {
/// The storage limit.
storage: FixedU64,
},
}

#[pallet::error]
Expand Down Expand Up @@ -131,10 +141,14 @@ pub mod pallet {
#[pallet::genesis_config]
#[derive(DefaultNoBound)]
pub struct GenesisConfig<T: Config> {
/// The compute limit.
pub compute: FixedU64,
/// The storage limit.
pub storage: FixedU64,
/// The amount of trash data for wasting proof size.
pub trash_data_count: u32,
#[serde(skip)]
/// The required configuration field.
pub _config: sp_std::marker::PhantomData<T>,
}

Expand Down