Skip to content

Commit 97fc388

Browse files
committed
set announce_next_key & execute_revealed pays::no
1 parent 534baf6 commit 97fc388

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

pallets/shield/src/lib.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,13 @@ pub mod pallet {
160160
#[pallet::call]
161161
impl<T: Config> Pallet<T> {
162162
#[pallet::call_index(0)]
163-
#[pallet::weight(
163+
#[pallet::weight((
164164
Weight::from_parts(9_979_000, 0)
165165
.saturating_add(T::DbWeight::get().reads(1_u64))
166-
.saturating_add(T::DbWeight::get().writes(1_u64))
167-
)]
166+
.saturating_add(T::DbWeight::get().writes(1_u64)),
167+
DispatchClass::Operational,
168+
Pays::No
169+
))]
168170
pub fn announce_next_key(
169171
origin: OriginFor<T>,
170172
public_key: BoundedVec<u8, ConstU32<2048>>,
@@ -227,9 +229,13 @@ pub mod pallet {
227229

228230
/// Executed by the block author.
229231
#[pallet::call_index(2)]
230-
#[pallet::weight(Weight::from_parts(77_280_000, 0)
231-
.saturating_add(T::DbWeight::get().reads(4_u64))
232-
.saturating_add(T::DbWeight::get().writes(2_u64)))]
232+
#[pallet::weight((
233+
Weight::from_parts(77_280_000, 0)
234+
.saturating_add(T::DbWeight::get().reads(4_u64))
235+
.saturating_add(T::DbWeight::get().writes(2_u64)),
236+
DispatchClass::Operational,
237+
Pays::No
238+
))]
233239
#[allow(clippy::useless_conversion)]
234240
pub fn execute_revealed(
235241
origin: OriginFor<T>,

0 commit comments

Comments
 (0)